binary/binary library

Classes

BitUtils
Class container for bit utility functions.
BytesUtils
A utility class for working with binary data represented as lists of integers (bytes).
DynamicByteTracker
A utility class for tracking bytes dynamically.

Constants

mask13 → const int
A constant representing a 13-bit mask with all relevant bits set to 1.
mask16 → const int
A constant representing a 16-bit mask with all bits set to 1.
mask32 → const int
A constant representing a 32-bit mask with all bits set to 1.
mask8 → const int
A constant representing an 8-bit mask with all bits set to 1.

Properties

maxU64 BigInt
final

Functions

add32(int x, int y) int
Adds two 32-bit integers and applies a mask to ensure the result fits within 32 bits.
readUint16BE(List<int> data, [int offset = 0]) int
Reads a 16-bit unsigned integer value in big-endian byte order from a list.
readUint16LE(List<int> array, [int offset = 0]) int
Reads a 16-bit unsigned integer value in little-endian byte order from a list.
readUint32BE(List<int> array, [int offset = 0]) int
Reads a 32-bit unsigned integer value in big-endian byte order from a list.
readUint32LE(List<int> array, [int offset = 0]) int
Reads a 32-bit unsigned integer value in little-endian byte order from a list.
readUint8(List<int> array, [int offset = 0]) int
Reads an 8-bit unsigned integer value from a list.
rotl32(int val, int shift) int
Rotates a 32-bit integer left by a specified number of bits.
rotr32(int val, int shift) int
Rotates a 32-bit integer right by a specified number of bits.
shr16(int x) int
Right-shifts a 32-bit integer by 16 bits and applies a mask to ensure the result fits within 16 bits.
writeUint16BE(int value, List<int> out, [int offset = 0]) → void
Writes a 16-bit unsigned integer value in big-endian byte order to a list.
writeUint16LE(int value, List<int> out, [int offset = 0]) → void
Writes a 16-bit unsigned integer value in little-endian byte order to a list.
writeUint32BE(int value, List<int> out, [int offset = 0]) → void
Writes a 32-bit unsigned integer value in big-endian byte order to a list.
writeUint32LE(int value, List<int> out, [int offset = 0]) → void
Writes a 32-bit unsigned integer value in little-endian byte order to a list.
writeUint64LE(int value, [List<int>? out, int offset = 0]) List<int>
Writes a 64-bit unsigned integer value in little-endian byte order to a list.
zero(List<int> array) → void
Sets all elements in a list to zero.