Method | Description | |
---|---|---|
CopyBytes ( byte output, int offset, int length ) : int |
Copies bytes from input buffer to output buffer starting at output[offset]. You have to make sure, that the buffer is byte aligned. If not enough bytes are available, copies fewer bytes.
|
|
DropBits ( int bitCount ) : void |
Drops the next n bits from the input. You should have called PeekBits with a bigger or equal n before, to make sure that enough bits are in the bit buffer.
|
|
GetBits ( int bitCount ) : int |
Gets the next n bits and increases input pointer. This is equivalent to PeekBits followed by DropBits, except for correct error handling.
|
|
PeekBits ( int bitCount ) : int |
Get the next sequence of bits but don't increase input pointer. bitCount must be less or equal 16 and if this call succeeds, you must drop at least n - 8 bits in the next call.
|
|
Reset ( ) : void |
Resets state and empties internal buffers
|
|
SetInput ( byte buffer, int offset, int count ) : void |
Add more input for consumption. Only call when IsNeedingInput returns true
|
|
SkipToByteBoundary ( ) : void |
Skips to the next byte boundary.
|
public CopyBytes ( byte output, int offset, int length ) : int | ||
output | byte | /// The buffer to copy bytes to. /// |
offset | int | /// The offset in the buffer at which copying starts /// |
length | int | /// The length to copy, 0 is allowed. /// |
return | int |
public DropBits ( int bitCount ) : void | ||
bitCount | int | The number of bits to drop. |
return | void |
public GetBits ( int bitCount ) : int | ||
bitCount | int | The number of bits to retrieve. |
return | int |
public PeekBits ( int bitCount ) : int | ||
bitCount | int | The number of bits to peek. |
return | int |
public SetInput ( byte buffer, int offset, int count ) : void | ||
buffer | byte | data to be input |
offset | int | offset of first byte of input |
count | int | number of bytes of input to add. |
return | void |