DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.12.4" />

 BitVector

public static class BitVector
Allows to convert bit vectors to scalar values.
public static void FromByte(byte value, Span<bool> bits)

Extracts bits from 8-bit unsigned integer.

public static void FromInt(IntPtr value, Span<bool> bits)

Extracts bits from platform-dependent signed integer.

public static void FromInt16(short value, Span<bool> bits)

Extracts bits from 16-bit signed integer.

public static void FromInt32(int value, Span<bool> bits)

Extracts bits from 32-bit signed integer.

public static void FromInt64(long value, Span<bool> bits)

Extracts bits from 64-bit signed integer.

public static void FromSByte(sbyte value, Span<bool> bits)

Extracts bits from 8-bit signed integer.

public static void FromUInt(UIntPtr value, Span<bool> bits)

Extracts bits from platform-dependent signed integer.

public static void FromUInt16(ushort value, Span<bool> bits)

Extracts bits from 16-bit unsigned integer.

public static void FromUInt32(uint value, Span<bool> bits)

Extracts bits from 32-bit unsigned integer.

public static void FromUInt64(ulong value, Span<bool> bits)

Extracts bits from 64-bit unsigned integer.

public static byte ToByte(ReadOnlySpan<bool> bits)

Converts bit vector to 8-bit unsigned integer.

public static IntPtr ToInt(ReadOnlySpan<bool> bits)

Converts bit vector to platform-dependent signed integer.

public static short ToInt16(ReadOnlySpan<bool> bits)

Converts bit vector to 16-bit signed integer.

public static int ToInt32(ReadOnlySpan<bool> bits)

Converts bit vector to 32-bit signed integer.

public static long ToInt64(ReadOnlySpan<bool> bits)

Converts bit vector to 64-bit signed integer.

public static sbyte ToSByte(ReadOnlySpan<bool> bits)

Converts bit vector to 8-bit signed integer.

public static UIntPtr ToUInt(ReadOnlySpan<bool> bits)

Converts bit vector to platform-dependent unsigned integer.

public static ushort ToUInt16(ReadOnlySpan<bool> bits)

Converts bit vector to 16-bit unsigned integer.

public static uint ToUInt32(ReadOnlySpan<bool> bits)

Converts bit vector to 32-bit unsigned integer.

public static ulong ToUInt64(ReadOnlySpan<bool> bits)

Converts bit vector to 64-bit unsigned integer.