C# Class zxingwp7.common.BitSource

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the number of bits read is not often a multiple of 8.

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array it passed in, in which case all bets are off.

Show file Open project: henningms/zxing2.0-wp7 Class Usage Examples

Public Methods

Method Description
BitSource ( sbyte bytes ) : System
available ( ) : int
readBits ( int numBits ) : int

Method Details

BitSource() public method

public BitSource ( sbyte bytes ) : System
bytes sbyte bytes from which this will read bits. Bits will be read from the first byte first. /// Bits are read within a byte from most-significant to least-significant bit. ///
return System

available() public method

public available ( ) : int
return int

readBits() public method

public readBits ( int numBits ) : int
numBits int number of bits to read ///
return int