Click or drag to resize
IBitStream Interface
The interface for classes that can take an array of bytes and stream bits from that byte array.

Namespace: VirtualRadar.Interface
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface IBitStream

The IBitStream type exposes the following members.

Properties
  NameDescription
Public propertyLengthRemaining
Gets the number of bits remaining on the stream.
Top
Methods
  NameDescription
Public methodInitialise
Initialises the stream with an array of bytes. The read methods will return bits from those bytes.
Public methodReadBit
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.
Public methodReadByte
Returns up to the next 8 bits from the stream.
Public methodReadUInt16
Returns up to the next 16 bits from the stream in big-endian order.
Public methodReadUInt32
Returns up to the next 32 bits from the stream in big-endian order.
Public methodReadUInt64
Returns up to the next 64 bits from the stream in big-endian order.
Public methodSkip
Skips a number of bits in the stream.
Top
Remarks

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.

See Also