BitStream Class |
[This is preliminary documentation and is subject to change.]
Namespace: MLAPI.Serialization
The BitStream type exposes the following members.
| Name | Description | |
|---|---|---|
| BitStream |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
| |
| BitStream(Byte) |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
NOTE: when using a pre-allocated buffer, the stream will not grow!
| |
| BitStream(Int32) |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
| |
| BitStream(Single) |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
| |
| BitStream(Int32, Single) |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
| |
| BitStream(Byte, Int32, Int32) |
A stream that supports writing data smaller than a single byte. This stream also has a built-in compression algorithm that can (optionally) be used to write compressed data.
|
| Name | Description | |
|---|---|---|
| BitAligned |
Whether or not the current BitPosition is evenly divisible by 8. I.e. whether or not the BitPosition is at a byte boundary.
| |
| BitLength |
Length of data (in bits) that is considered to be written to the stream.
| |
| BitPosition |
Bit offset into the buffer that new data will be written to.
| |
| CanRead |
Whether or not data can be read from the stream.
(Overrides StreamCanRead.) | |
| CanSeek |
Whether or not seeking is supported by this stream. (Always true)
(Overrides StreamCanSeek.) | |
| CanTimeout | (Inherited from Stream.) | |
| CanWrite |
Whether or not this stream can accept new data. NOTE: this will return true even if only fewer than 8 bits can be written!
(Overrides StreamCanWrite.) | |
| Capacity |
Current buffer size. The buffer will not be resized (if possible) until Position is equal to Capacity and an attempt to write data is made.
| |
| GrowthFactor |
Factor by which buffer should grow when necessary.
| |
| Length |
The current length of data considered to be "written" to the buffer.
(Overrides StreamLength.) | |
| Position |
The index that will be written to when any call to write data is made to this stream.
(Overrides StreamPosition.) | |
| ReadTimeout | (Inherited from Stream.) | |
| Resizable |
Whether or not the stream will grow the buffer to accomodate more data.
| |
| WriteTimeout | (Inherited from Stream.) |
| Name | Description | |
|---|---|---|
| BeginRead | (Inherited from Stream.) | |
| BeginWrite | (Inherited from Stream.) | |
| Close | (Inherited from Stream.) | |
| CopyFrom(Stream, Int32) |
Copy data from another stream
| |
| CopyFrom(BitStream, Int32, Boolean) |
Copys the bits from the provided BitStream
| |
| CopyUnreadFrom | ||
| CreateObjRef | (Inherited from MarshalByRefObject.) | |
| CreateWaitHandle | Obsolete. (Inherited from Stream.) | |
| Dispose | (Inherited from Stream.) | |
| Dispose(Boolean) | (Inherited from Stream.) | |
| EndRead | (Inherited from Stream.) | |
| EndWrite | (Inherited from Stream.) | |
| Equals | (Inherited from Object.) | |
| Finalize | (Inherited from Object.) | |
| Flush |
Flush stream. This does nothing since data is written directly to a byte buffer.
(Overrides StreamFlush.) | |
| GetBuffer |
Get the internal buffer being written to by this stream.
| |
| GetHashCode | (Inherited from Object.) | |
| GetLifetimeService | (Inherited from MarshalByRefObject.) | |
| GetType | (Inherited from Object.) | |
| InitializeLifetimeService | (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | (Inherited from Object.) | |
| MemberwiseClone(Boolean) | (Inherited from MarshalByRefObject.) | |
| PeekByte |
Peeks a byte without advancing the position
| |
| Read |
Read a subset of the stream buffer and write the contents to the supplied buffer.
(Overrides StreamRead(Byte, Int32, Int32).) | |
| ReadBit |
Read a single bit from the stream.
| |
| ReadByte |
Read a byte from the buffer. This takes into account possible byte misalignment.
(Overrides StreamReadByte.) | |
| Seek |
Set position in stream to read from/write to.
(Overrides StreamSeek(Int64, SeekOrigin).) | |
| SetLength |
Set length of data considered to be "written" to the stream.
(Overrides StreamSetLength(Int64).) | |
| ToArray |
Creates a copy of the internal buffer. This only contains the used bytes
| |
| ToString |
Returns hex encoded version of the buffer
(Overrides ObjectToString.) | |
| Write(Byte) |
Write data from the given buffer to the internal stream buffer.
| |
| Write(Byte, Int32, Int32) |
Write data from the given buffer to the internal stream buffer.
(Overrides StreamWrite(Byte, Int32, Int32).) | |
| WriteBit |
Write a single bit to the stream
| |
| WriteByte | (Inherited from Stream.) |