C# Класс System.IO.BitSplitter

Splits a byte array into values, based on a series of bit lengths Translations are done from network byte order.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
offset long
src byte[]

Открытые методы

Метод Описание
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)

Защищенные методы

Метод Описание
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

Описание методов

AlignToByte() публичный Метод

Move to the next byte edge (no action if already on one -- moves between 0 and 7 bits)
public AlignToByte ( ) : void
Результат void

BitSplitter() публичный Метод

public BitSplitter ( byte RawData ) : System
RawData byte
Результат System

GetFlag() публичный Метод

Read a single bit, and return true if set to '1'. Advances position by 1 bit
public GetFlag ( ) : bool
Результат bool

GetInteger() публичный Метод

Return an unsigned long for the integer bits
public GetInteger ( int BitLength ) : ulong
BitLength int
Результат ulong

GetNext() защищенный Метод

Get an unshifted array of bits packed in bytes. Advances position counter.
protected GetNext ( int l ) : byte[]
l int
Результат byte[]

Mask() защищенный Метод

Create a byte mask
protected Mask ( int start, int length ) : byte[]
start int number of bits skipped
length int run length (bits)
Результат byte[]

RemainingBytes() публичный Метод

Return a new array containing all remaining whole bytes not consumed.
public RemainingBytes ( ) : byte[]
Результат byte[]

SkipBits() публичный Метод

Move forward a given number of bits. They are consumed but not processed.
public SkipBits ( int BitCount ) : void
BitCount int
Результат void

SkipBytes() публичный Метод

Move forward a given number of bytes. They are consumed but not processed.
public SkipBytes ( int ByteCount ) : void
ByteCount int
Результат void

SkipToNextByte() публичный Метод

Move forward to next byte edge (moves between 1 and 8 bits)
public SkipToNextByte ( ) : void
Результат void

Описание свойств

offset защищенное свойство

protected long offset
Результат long

src защищенное свойство

protected byte[] src
Результат byte[]