BitsAndBytes

public static class BitsAndBytes
Provides conversion methods for bit and byte arrays to and from strings.

Methods

BitArrayToString

#
Convert a bitarray to a sequence of '0' and '1' characters.
public static string BitArrayToString(
bits
Bits to format.
)
A string representing the bit array.

ByteArrayToString

#
Convert a byte array to a string.
public static string ByteArrayToString(
byte[]
bytes,
Bytes to encode.
format
Formatting options.
)
A string representing the byte array.

StringToBitArray

#
Convert a string created with the BitArrayToString method back into a bit array.
public static BitArray StringToBitArray(
text
String to convert.
)
The bit array that was represented by the string.

StringToByteArray

#
Convert a string to a byte array.
public static byte[] StringToByteArray(
text,
String to decode.
format
Formatting options.
)
The byte array represented by the string.