IBitStream Interface |
Namespace: VirtualRadar.Interface
The IBitStream type exposes the following members.
Name | Description | |
---|---|---|
LengthRemaining |
Gets the number of bits remaining on the stream.
|
Name | Description | |
---|---|---|
Initialise |
Initialises the stream with an array of bytes. The read methods will return bits from those bytes.
| |
ReadBit |
Returns the next bit from the stream. A true value indicates that the next bit was set, a false value indicates the next bit was clear.
| |
ReadByte |
Returns up to the next 8 bits from the stream.
| |
ReadUInt16 |
Returns up to the next 16 bits from the stream in big-endian order.
| |
ReadUInt32 |
Returns up to the next 32 bits from the stream in big-endian order.
| |
ReadUInt64 |
Returns up to the next 64 bits from the stream in big-endian order.
| |
Skip |
Skips a number of bits in the stream.
|
An exception is thrown if any operation moves past the end of the stream. Bits can be read across byte boundaries - e.g. if the bytes are 00001111 01010000 then doing a Skip(4) followed by a ReadByte(8) will return 11110101.
Implementations do not need to be thread-safe. If thread-safety is required then it is up to the caller to lock the BitStream.