C# Class System.IO.BitSplitter

Splits a byte array into values, based on a series of bit lengths Translations are done from network byte order.
显示文件 Open project: i-e-b/HLS---Smooth-Encoder Class Usage Examples

Protected Properties

Property Type Description
offset long
src byte[]

Public Methods

Method Description
AlignToByte ( ) : void

Move to the next byte edge (no action if already on one -- moves between 0 and 7 bits)

BitSplitter ( byte RawData ) : System
GetFlag ( ) : bool

Read a single bit, and return true if set to '1'. Advances position by 1 bit

GetInteger ( int BitLength ) : ulong

Return an unsigned long for the integer bits

RemainingBytes ( ) : byte[]

Return a new array containing all remaining whole bytes not consumed.

SkipBits ( int BitCount ) : void

Move forward a given number of bits. They are consumed but not processed.

SkipBytes ( int ByteCount ) : void

Move forward a given number of bytes. They are consumed but not processed.

SkipToNextByte ( ) : void

Move forward to next byte edge (moves between 1 and 8 bits)

Protected Methods

Method Description
GetNext ( int l ) : byte[]

Get an unshifted array of bits packed in bytes. Advances position counter.

Mask ( int start, int length ) : byte[]

Create a byte mask

Method Details

AlignToByte() public method

Move to the next byte edge (no action if already on one -- moves between 0 and 7 bits)
public AlignToByte ( ) : void
return void

BitSplitter() public method

public BitSplitter ( byte RawData ) : System
RawData byte
return System

GetFlag() public method

Read a single bit, and return true if set to '1'. Advances position by 1 bit
public GetFlag ( ) : bool
return bool

GetInteger() public method

Return an unsigned long for the integer bits
public GetInteger ( int BitLength ) : ulong
BitLength int
return ulong

GetNext() protected method

Get an unshifted array of bits packed in bytes. Advances position counter.
protected GetNext ( int l ) : byte[]
l int
return byte[]

Mask() protected method

Create a byte mask
protected Mask ( int start, int length ) : byte[]
start int number of bits skipped
length int run length (bits)
return byte[]

RemainingBytes() public method

Return a new array containing all remaining whole bytes not consumed.
public RemainingBytes ( ) : byte[]
return byte[]

SkipBits() public method

Move forward a given number of bits. They are consumed but not processed.
public SkipBits ( int BitCount ) : void
BitCount int
return void

SkipBytes() public method

Move forward a given number of bytes. They are consumed but not processed.
public SkipBytes ( int ByteCount ) : void
ByteCount int
return void

SkipToNextByte() public method

Move forward to next byte edge (moves between 1 and 8 bits)
public SkipToNextByte ( ) : void
return void

Property Details

offset protected_oe property

protected long offset
return long

src protected_oe property

protected byte[] src
return byte[]