C# Class Alexandria.Compression.BitStream

Provides for reading bits from a Stream.
显示文件 Open project: Burton-Radons/Alexandria Class Usage Examples

Public Properties

Property Type Description
BitCount int
Bits uint
Stream Stream

Public Methods

Method Description
BitStream ( Stream stream ) : System

Initialise the bitstream with the given stream.

BooleanLSB ( ) : bool

Read a bit in LSB order and return whether it's non-zero.

BooleanMSB ( ) : bool

Read a bit in MSB order and return whether it's non-zero.

FetchLSB ( ) : void

Fill the bit buffer in LSB order.

FetchMSB ( ) : void

Fill the bit buffer in MSB order.

PeekLSB ( int count ) : int

Peek at the next number of bits in LSB order.

PeekMSB ( int count ) : int

Peek at the next number of bits in MSB order.

ReadLSB ( int count ) : int

Read some bits in LSB order.

ReadMSB ( int count ) : int

Read some bits in MSB order.

ToString ( ) : string

Convert to a string representation of the bit stream.

Method Details

BitStream() public method

Initialise the bitstream with the given stream.
is null.
public BitStream ( Stream stream ) : System
stream Stream The to read from.
return System

BooleanLSB() public method

Read a bit in LSB order and return whether it's non-zero.
public BooleanLSB ( ) : bool
return bool

BooleanMSB() public method

Read a bit in MSB order and return whether it's non-zero.
public BooleanMSB ( ) : bool
return bool

FetchLSB() public method

Fill the bit buffer in LSB order.
public FetchLSB ( ) : void
return void

FetchMSB() public method

Fill the bit buffer in MSB order.
public FetchMSB ( ) : void
return void

PeekLSB() public method

Peek at the next number of bits in LSB order.
public PeekLSB ( int count ) : int
count int
return int

PeekMSB() public method

Peek at the next number of bits in MSB order.
public PeekMSB ( int count ) : int
count int
return int

ReadLSB() public method

Read some bits in LSB order.
public ReadLSB ( int count ) : int
count int
return int

ReadMSB() public method

Read some bits in MSB order.
public ReadMSB ( int count ) : int
count int
return int

ToString() public method

Convert to a string representation of the bit stream.
public ToString ( ) : string
return string

Property Details

BitCount public_oe property

Get or set the number of bits that are currently buffered.
public int BitCount
return int

Bits public_oe property

Get or set the buffered bit values.
public uint Bits
return uint

Stream public_oe property

Get the System.IO.Stream to read bytes from.
public Stream Stream
return Stream