BitStream class Null safety

Allows bit reading and writing

Constructors

BitStream({Uint8List? stream})
Initialises with an empty stream or with stream

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

checkBit(int bit) bool
Checks if bit is set or not
getCursor() int
Gets the current cursor position in bits
getLength() int
Gets the current length of the stream in bits
getStream() Uint8List
Gets the current stream
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
output() → void
Outputs the current stream to the console
read({int bytes = 0, int bits = 0}) int
Reads an int from the stream of length bytes and bits
readAsciiString({int bytes = 0, int bits = 0}) String
Reads an ASCII string from the stream of length bytes and bits
readBitStream({int bytes = 0, int bits = 0}) BitStream
Reads a BitStream object from the stream of length bytes and bits
readBool() bool
Reads a bool from the stream
readBytes({int bytes = 0, int bits = 0}) Uint8List
Reads a byte array from the stream of length bytes and bits
readHexString({int bytes = 0, int bits = 0}) String
Reads a HEX string from the stream of length bytes and bits
resetCursor() → void
Resets the cursor position
toString() String
Returns the current stream
override
write(int input, {int bytes = 0, int bits = 0}) → void
Writes an int to the stream of length bytes and bits
writeAsciiString(String input, {int bytes = 0, int bits = 0}) → void
Writes an ASCII string to the stream of length bytes and bits
writeBitStream(BitStream input, {int bytes = 0, int bits = 0}) → void
Reads a BitStream object from the stream of length bytes and bits
writeBool(bool input) → void
Writes a bool to the stream
writeBytes(Uint8List input, {int bytes = 0, int bits = 0}) → void
Writes a byte array to the stream of length bytes and bits
writeHexString(String input, {int bytes = 0, int bits = 0}) → void
Writes a HEX string to the stream of length bytes and bits

Operators

operator ==(Object other) bool
The equality operator.
inherited