C# Class Gammtek.Conduit.IO.BitRingBuffer

Ring buffer to read and write bits and bytes.
Show file Open project: ME3Explorer/ME3Explorer Class Usage Examples

Public Methods

Method Description
BitRingBuffer ( ) : System

Initializes a new instance of the BitRingBuffer class with a default buffer size of 256 bytes.

BitRingBuffer ( int bufferSize ) : System

Initializes a new instance of the BitRingBuffer class with a buffer size of bufferSize bytes.

Clear ( ) : void

Clear all data in the buffer.

ReadBoolean ( ) : bool

Reads a single bit from the stream.

ReadByte ( ) : byte

Reads a byte from the stream.

ReadBytes ( byte buffer, int index, int count ) : void

Reads count bytes into buffer starting at index.

Write ( bool value ) : void

Writes the value as a bit in the buffer.

Write ( byte value ) : void

Writes the value to the buffer.

Write ( byte buffer, int index, int count ) : void

Writes count bytes from buffer starting at index.

Private Methods

Method Description
this ( int i ) : bool

Method Details

BitRingBuffer() public method

Initializes a new instance of the BitRingBuffer class with a default buffer size of 256 bytes.
public BitRingBuffer ( ) : System
return System

BitRingBuffer() public method

Initializes a new instance of the BitRingBuffer class with a buffer size of bufferSize bytes.
public BitRingBuffer ( int bufferSize ) : System
bufferSize int
return System

Clear() public method

Clear all data in the buffer.
public Clear ( ) : void
return void

ReadBoolean() public method

Reads a single bit from the stream.
public ReadBoolean ( ) : bool
return bool

ReadByte() public method

Reads a byte from the stream.
public ReadByte ( ) : byte
return byte

ReadBytes() public method

Reads count bytes into buffer starting at index.
public ReadBytes ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
return void

Write() public method

Writes the value as a bit in the buffer.
public Write ( bool value ) : void
value bool
return void

Write() public method

Writes the value to the buffer.
public Write ( byte value ) : void
value byte
return void

Write() public method

Writes count bytes from buffer starting at index.
public Write ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
return void