Photon Fusion
2.0.8
BitStream serialization methods. More...
Public Member Functions | |
| delegate void | ArrayElementSerializer< T > (ref T element) |
| Serialize a value. More... | |
| BitStream () | |
| Initializes a new instance of the BitStream class with an empty byte array. More... | |
| BitStream (byte[] arr) | |
| Initializes a new instance of the BitStream class with the specified byte array. More... | |
| BitStream (byte[] arr, int size) | |
| Initializes a new instance of the BitStream class with the specified byte array and size. More... | |
| BitStream (Int32 size) | |
| Initializes a new instance of the BitStream class with a specified size in bytes. More... | |
| bool | CanRead () |
| Checks if at least one bit can be read from the stream. More... | |
| bool | CanRead (int bits) |
| Checks if the specified number of bits can be read from the stream. More... | |
| bool | CanWrite () |
| Checks if at least one bit can be written to the stream. More... | |
| bool | CanWrite (int bits) |
| Checks if the specified number of bits can be written to the stream. More... | |
| bool | Condition (bool condition) |
| Evaluates a condition and serializes it if in write mode, or deserializes it if in read mode. More... | |
| void | CopyFromArray (Byte[] array) |
| Copies data from the specified byte array into the internal buffer. More... | |
| void | Expand () |
| Doubles the capacity of the internal buffer. More... | |
| bool | ReadBool () |
| Reads a boolean value from the stream. More... | |
| bool | ReadBoolean () |
| Reads a boolean value from the stream. More... | |
| byte | ReadByte () |
| Reads a byte value from the stream. More... | |
| byte | ReadByte (int bits) |
| Reads a byte value from the stream with a specified number of bits. More... | |
| void | ReadByteArray (byte[] to) |
| Reads bytes from the stream into the specified byte array. More... | |
| void | ReadByteArray (byte[] to, int count) |
| Reads a specified number of bytes from the stream into the specified byte array. More... | |
| void | ReadByteArray (byte[] to, int offset, int count) |
| Reads a specified number of bytes from the stream into the specified byte array starting at a given offset. More... | |
| byte[] | ReadByteArray (int size) |
| Reads a specified number of bytes from the stream into a new byte array. More... | |
| byte[] | ReadByteArrayLengthPrefixed () |
| Reads a byte array from the stream with a length prefix. More... | |
| Char | ReadChar () |
| Reads a character value from the stream. More... | |
| double | ReadDouble () |
| Reads a 64-bit floating point value from the stream. More... | |
| float | ReadFloat () |
| Reads a 32-bit floating point value from the stream. More... | |
| Guid | ReadGuid () |
| Reads a GUID from the stream. More... | |
| int | ReadInt () |
| Reads a 32-bit integer value from the stream. More... | |
| int | ReadInt (int bits) |
| Reads a 32-bit integer value from the stream with a specified number of bits. More... | |
| int | ReadInt_Shifted (int bits, int shift) |
| Reads a shifted 32-bit integer value from the stream with a specified number of bits. More... | |
| long | ReadLong () |
| Reads a signed 64-bit integer value from the stream. More... | |
| long | ReadLong (int bits) |
| Reads a signed 64-bit integer value from the stream with a specified number of bits. More... | |
| sbyte | ReadSByte () |
| Reads a signed byte value from the stream. More... | |
| short | ReadShort () |
| Reads a short value from the stream. More... | |
| short | ReadShort (int bits) |
| Reads a short value from the stream with a specified number of bits. More... | |
| string | ReadString () |
| Reads a string from the stream using UTF-8 encoding. More... | |
| string | ReadString (Encoding encoding) |
| Reads a string from the stream using the specified encoding. More... | |
| uint | ReadUInt () |
| Reads an unsigned 32-bit integer value from the stream. More... | |
| uint | ReadUInt (int bits) |
| Reads an unsigned 32-bit integer value from the stream with a specified number of bits. More... | |
| ulong | ReadULong () |
| Reads an unsigned 64-bit integer value from the stream. More... | |
| ulong | ReadULong (int bits) |
| Reads an unsigned 64-bit integer value from the stream with a specified number of bits. More... | |
| ushort | ReadUShort () |
| Reads an unsigned short value from the stream. More... | |
| ushort | ReadUShort (int bits) |
| Reads an unsigned short value from the stream with a specified number of bits. More... | |
| void | Reset () |
| Resets the internal buffer to its initial state. More... | |
| void | Reset (Int32 byteSize) |
| Resets the internal buffer to the specified size. More... | |
| void | ResetFast (Int32 byteSize) |
| Resets the internal buffer to the specified size without clearing the data. More... | |
| int | RoundToByte () |
| Rounds the current position to the nearest byte boundary by filling with zero bits if necessary. More... | |
| unsafe void | Serialize (byte *v) |
| Serializes or deserializes a byte value. More... | |
| unsafe void | Serialize (int *v) |
| Serializes or deserializes an integer value. More... | |
| unsafe void | Serialize (int *v, int bits) |
| Serializes or deserializes a 32-bit integer value with a specified number of bits. More... | |
| unsafe void | Serialize (long *v) |
| Serializes or deserializes a 64-bit integer value. More... | |
| void | Serialize (ref bool value) |
| Serializes or deserializes a boolean value. More... | |
| void | Serialize (ref Byte value) |
| Serializes or deserializes a byte value. More... | |
| void | Serialize (ref Byte[] array, ref Int32 length) |
| Serializes or deserializes a byte array with a specified length. More... | |
| void | Serialize (ref Byte[] array, ref Int32 length, Int32 fixedSize) |
| Serializes or deserializes a byte array with a specified length and fixed size. More... | |
| void | Serialize (ref Byte[] value) |
| Serializes or deserializes a byte array with a length prefix. More... | |
| void | Serialize (ref Byte[] value, Int32 fixedSize) |
| Serializes or deserializes a byte array with a fixed size. More... | |
| void | Serialize (ref Double value) |
| Serializes or deserializes a double value. More... | |
| void | Serialize (ref float value) |
| Serializes or deserializes a float value. More... | |
| void | Serialize (ref int value) |
| Serializes or deserializes a 32-bit integer value. More... | |
| void | Serialize (ref int value, int bits) |
| Serializes or deserializes a 32-bit integer value with a specified number of bits. More... | |
| void | Serialize (ref Int32[] value) |
| Serializes or deserializes an array of 32-bit integers. More... | |
| void | Serialize (ref Int64 value) |
| Serializes or deserializes a 64-bit integer value. More... | |
| void | Serialize (ref String value) |
| Serializes or deserializes a string value. More... | |
| void | Serialize (ref uint value) |
| Serializes or deserializes a 32-bit unsigned integer value. More... | |
| void | Serialize (ref uint value, int bits) |
| Serializes or deserializes a 32-bit unsigned integer value with a specified number of bits. More... | |
| void | Serialize (ref UInt64 value) |
| Serializes or deserializes a 64-bit unsigned integer value. More... | |
| void | Serialize (ref ulong value, int bits) |
| Serializes or deserializes a 64-bit unsigned integer value with a specified number of bits. More... | |
| unsafe void | Serialize (sbyte *v) |
| Serializes or deserializes a signed byte value. More... | |
| unsafe void | Serialize (short *v) |
| Serializes or deserializes a short value. More... | |
| unsafe void | Serialize (uint *v) |
| Serializes or deserializes an unsigned 32-bit integer value. More... | |
| unsafe void | Serialize (uint *v, int bits) |
| Serializes or deserializes an unsigned 32-bit integer value with a specified number of bits. More... | |
| unsafe void | Serialize (ulong *v) |
| Serializes or deserializes an unsigned 64-bit integer value. More... | |
| unsafe void | Serialize (ushort *v) |
| Serializes or deserializes an unsigned short value. More... | |
| void | SerializeArray< T > (ref T[] array, ArrayElementSerializer< T > serializer) |
| Serializes or deserializes an array of elements using a specified serializer. More... | |
| void | SerializeArrayLength< T > (ref T[] array) |
| Serializes or deserializes the length of an array. More... | |
| unsafe void | SerializeBuffer (byte *buffer, int length) |
| Serializes or deserializes a buffer of byte values. More... | |
| unsafe void | SerializeBuffer (int *buffer, int length) |
| Serializes or deserializes a buffer of 32-bit integer values. More... | |
| unsafe void | SerializeBuffer (long *buffer, int length) |
| Serializes or deserializes a buffer of 64-bit integer values. More... | |
| unsafe void | SerializeBuffer (sbyte *buffer, int length) |
| Serializes or deserializes a buffer of signed byte values. More... | |
| unsafe void | SerializeBuffer (short *buffer, int length) |
| Serializes or deserializes a buffer of short values. More... | |
| unsafe void | SerializeBuffer (uint *buffer, int length) |
| Serializes or deserializes a buffer of unsigned 32-bit integer values. More... | |
| unsafe void | SerializeBuffer (ulong *buffer, int length) |
| Serializes or deserializes a buffer of unsigned 64-bit integer values. More... | |
| unsafe void | SerializeBuffer (ushort *buffer, int length) |
| Serializes or deserializes a buffer of unsigned short values. More... | |
| void | SetBuffer (byte[] arr) |
| Sets the internal buffer to the specified byte array. More... | |
| void | SetBuffer (byte[] arr, int size) |
| Sets the internal buffer to the specified byte array and size. More... | |
| byte[] | ToArray () |
| Converts the internal buffer to a byte array. More... | |
| bool | WriteBool (bool value) |
| Writes a boolean value to the stream. More... | |
| bool | WriteBoolean (bool value) |
| Writes a boolean value to the stream. More... | |
| void | WriteByte (byte value) |
| Writes a byte value to the stream. More... | |
| void | WriteByte (byte value, int bits) |
| Writes a byte value to the stream with a specified number of bits. More... | |
| void | WriteByteArray (byte[] from) |
| Writes a byte array to the stream. More... | |
| void | WriteByteArray (byte[] from, int count) |
| Writes a specified number of bytes from a byte array to the stream. More... | |
| void | WriteByteArray (byte[] from, int offset, int count) |
| Writes a specified number of bytes from a byte array to the stream starting at a given offset. More... | |
| void | WriteByteArrayLengthPrefixed (byte[] array) |
| Writes a byte array to the stream with a length prefix. More... | |
| void | WriteByteArrayLengthPrefixed (byte[] array, int maxLength) |
| Writes a byte array to the stream with a length prefix and a specified maximum length. More... | |
| void | WriteChar (Char value) |
| Writes a character value to the stream. More... | |
| void | WriteDouble (double value) |
| Writes a 64-bit floating point value to the stream. More... | |
| void | WriteFloat (float value) |
| Writes a 32-bit floating point value to the stream. More... | |
| void | WriteGuid (Guid guid) |
| Writes a GUID to the stream. More... | |
| void | WriteInt (int value) |
| Writes a 32-bit integer value to the stream. More... | |
| void | WriteInt (int value, int bits) |
| Writes a 32-bit integer value to the stream with a specified number of bits. More... | |
| void | WriteInt_Shifted (int value, int bits, int shift) |
| Writes a shifted 32-bit integer value to the stream with a specified number of bits. More... | |
| void | WriteLong (long value) |
| Writes a signed 64-bit integer value to the stream. More... | |
| void | WriteLong (long value, int bits) |
| Writes a signed 64-bit integer value to the stream with a specified number of bits. More... | |
| void | WriteSByte (sbyte value) |
| Writes a signed byte value to the stream. More... | |
| void | WriteShort (short value) |
| Writes a short value to the stream. More... | |
| void | WriteShort (short value, int bits) |
| Writes a short value to the stream with a specified number of bits. More... | |
| void | WriteString (string value) |
| Writes a string to the stream using UTF-8 encoding. More... | |
| void | WriteString (string value, Encoding encoding) |
| Writes a string to the stream using the specified encoding. More... | |
| void | WriteUInt (uint value) |
| Writes an unsigned 32-bit integer value to the stream. More... | |
| void | WriteUInt (uint value, int bits) |
| Writes an unsigned 32-bit integer value to the stream with a specified number of bits. More... | |
| void | WriteULong (ulong value) |
| Writes an unsigned 64-bit integer value to the stream. More... | |
| void | WriteULong (ulong value, int bits) |
| Writes an unsigned 64-bit integer value to the stream with a specified number of bits. More... | |
| void | WriteUShort (ushort value) |
| Writes an unsigned short value to the stream. More... | |
| void | WriteUShort (ushort value, int bits) |
| Writes an unsigned short value to the stream with a specified number of bits. More... | |
Static Public Member Functions | |
| static void | WriteByteAt (byte[] data, int ptr, int bits, byte value) |
| Writes a byte value at a specified bit position in a byte array. More... | |
Properties | |
| int | BytesRequired [get] |
| Size of written buffer in BYTES Ammount of bytes required considering the total of written bytes More... | |
| int | Capacity [get] |
| Total Size in BYTES of the Buffer More... | |
| Byte[] | Data [get] |
| Internal Byte Array More... | |
| bool | Done [get] |
| Signal if the buffer was completely written More... | |
| bool | IsEvenBytes [get] |
| Gets a value indicating whether the current position is at an even byte boundary. More... | |
| bool | Overflowing [get] |
| Signal if the buffer is overflowing More... | |
| int | Position [get, set] |
| Current read/write position in BITS inside the Buffer More... | |
| bool | Reading [get, set] |
| Signal if the Buffer is in Read Mode More... | |
| int | Size [get, set] |
| Total size in BITS of the buffer More... | |
| bool | Writing [get, set] |
| Signal if the Buffer is in Write Mode More... | |
BitStream serialization methods.
| BitStream | ( | Int32 | size | ) |
Initializes a new instance of the BitStream class with a specified size in bytes.
| size | The size of the byte array in bytes. |
| BitStream | ( | byte[] | arr | ) |
Initializes a new instance of the BitStream class with the specified byte array.
| arr | The byte array to use as the internal buffer. |
| BitStream | ( | byte[] | arr, |
| int | size | ||
| ) |
Initializes a new instance of the BitStream class with the specified byte array and size.
| arr | The byte array to use as the internal buffer. |
| size | The size of the byte array in bytes. |
| delegate void ArrayElementSerializer< T > | ( | ref T | element | ) |
Serialize a value.
| T | The value type. |
| bool CanRead | ( | ) |
Checks if at least one bit can be read from the stream.
| bool CanRead | ( | int | bits | ) |
Checks if the specified number of bits can be read from the stream.
| bits | The number of bits to check. |
| bool CanWrite | ( | ) |
Checks if at least one bit can be written to the stream.
| bool CanWrite | ( | int | bits | ) |
Checks if the specified number of bits can be written to the stream.
| bits | The number of bits to check. |
| bool Condition | ( | bool | condition | ) |
Evaluates a condition and serializes it if in write mode, or deserializes it if in read mode.
| condition | The condition to evaluate and serialize/deserialize. |
| void CopyFromArray | ( | Byte[] | array | ) |
Copies data from the specified byte array into the internal buffer.
| array | The byte array to copy from. |
| void Expand | ( | ) |
Doubles the capacity of the internal buffer.
| bool ReadBool | ( | ) |
Reads a boolean value from the stream.
| bool ReadBoolean | ( | ) |
Reads a boolean value from the stream.
| byte ReadByte | ( | ) |
Reads a byte value from the stream.
| byte ReadByte | ( | int | bits | ) |
Reads a byte value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| void ReadByteArray | ( | byte[] | to | ) |
Reads bytes from the stream into the specified byte array.
| to | The byte array to read into. |
| void ReadByteArray | ( | byte[] | to, |
| int | count | ||
| ) |
Reads a specified number of bytes from the stream into the specified byte array.
| to | The byte array to read into. |
| count | The number of bytes to read. |
| void ReadByteArray | ( | byte[] | to, |
| int | offset, | ||
| int | count | ||
| ) |
Reads a specified number of bytes from the stream into the specified byte array starting at a given offset.
| to | The byte array to read into. |
| offset | The starting offset in the byte array. |
| count | The number of bytes to read. |
| byte [] ReadByteArray | ( | int | size | ) |
Reads a specified number of bytes from the stream into a new byte array.
| size | The number of bytes to read. |
| byte [] ReadByteArrayLengthPrefixed | ( | ) |
Reads a byte array from the stream with a length prefix.
| Char ReadChar | ( | ) |
Reads a character value from the stream.
| double ReadDouble | ( | ) |
Reads a 64-bit floating point value from the stream.
| float ReadFloat | ( | ) |
Reads a 32-bit floating point value from the stream.
| Guid ReadGuid | ( | ) |
Reads a GUID from the stream.
| int ReadInt | ( | ) |
Reads a 32-bit integer value from the stream.
| int ReadInt | ( | int | bits | ) |
Reads a 32-bit integer value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| int ReadInt_Shifted | ( | int | bits, |
| int | shift | ||
| ) |
Reads a shifted 32-bit integer value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| shift | The number of bits to shift. |
| long ReadLong | ( | ) |
Reads a signed 64-bit integer value from the stream.
| long ReadLong | ( | int | bits | ) |
Reads a signed 64-bit integer value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| sbyte ReadSByte | ( | ) |
Reads a signed byte value from the stream.
| short ReadShort | ( | ) |
Reads a short value from the stream.
| short ReadShort | ( | int | bits | ) |
Reads a short value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| string ReadString | ( | ) |
Reads a string from the stream using UTF-8 encoding.
| string ReadString | ( | Encoding | encoding | ) |
Reads a string from the stream using the specified encoding.
| encoding | The encoding to use for the string. |
| uint ReadUInt | ( | ) |
Reads an unsigned 32-bit integer value from the stream.
| uint ReadUInt | ( | int | bits | ) |
Reads an unsigned 32-bit integer value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| ulong ReadULong | ( | ) |
Reads an unsigned 64-bit integer value from the stream.
| ulong ReadULong | ( | int | bits | ) |
Reads an unsigned 64-bit integer value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| ushort ReadUShort | ( | ) |
Reads an unsigned short value from the stream.
| ushort ReadUShort | ( | int | bits | ) |
Reads an unsigned short value from the stream with a specified number of bits.
| bits | The number of bits to read. |
| void Reset | ( | ) |
Resets the internal buffer to its initial state.
| void Reset | ( | Int32 | byteSize | ) |
Resets the internal buffer to the specified size.
| byteSize | The size in bytes to reset the buffer to. |
| void ResetFast | ( | Int32 | byteSize | ) |
Resets the internal buffer to the specified size without clearing the data.
| byteSize | The size in bytes to reset the buffer to. |
| int RoundToByte | ( | ) |
Rounds the current position to the nearest byte boundary by filling with zero bits if necessary.
| unsafe void Serialize | ( | byte * | v | ) |
Serializes or deserializes a byte value.
| v | The byte value to serialize/deserialize. |
| unsafe void Serialize | ( | int * | v | ) |
Serializes or deserializes an integer value.
| v | The integer value to serialize/deserialize. |
| unsafe void Serialize | ( | int * | v, |
| int | bits | ||
| ) |
Serializes or deserializes a 32-bit integer value with a specified number of bits.
| v | The 32-bit integer value to serialize/deserialize. |
| bits | The number of bits to use for serialization/deserialization. |
| unsafe void Serialize | ( | long * | v | ) |
Serializes or deserializes a 64-bit integer value.
| v | The 64-bit integer value to serialize/deserialize. |
| void Serialize | ( | ref bool | value | ) |
Serializes or deserializes a boolean value.
| value | The boolean value to serialize/deserialize. |
| void Serialize | ( | ref Byte | value | ) |
Serializes or deserializes a byte value.
| value | The byte value to serialize/deserialize. |
| void Serialize | ( | ref Byte[] | array, |
| ref Int32 | length | ||
| ) |
Serializes or deserializes a byte array with a specified length.
| array | The byte array to serialize/deserialize. |
| length | The length of the byte array. |
| void Serialize | ( | ref Byte[] | array, |
| ref Int32 | length, | ||
| Int32 | fixedSize | ||
| ) |
Serializes or deserializes a byte array with a specified length and fixed size.
| array | The byte array to serialize/deserialize. |
| length | The length of the byte array. |
| fixedSize | The fixed size of the byte array. |
| void Serialize | ( | ref Byte[] | value | ) |
Serializes or deserializes a byte array with a length prefix.
| value | The byte array to serialize/deserialize. |
| void Serialize | ( | ref Byte[] | value, |
| Int32 | fixedSize | ||
| ) |
Serializes or deserializes a byte array with a fixed size.
| value | The byte array to serialize/deserialize. |
| fixedSize | The fixed size of the byte array. |
| void Serialize | ( | ref Double | value | ) |
Serializes or deserializes a double value.
| value | The double value to serialize/deserialize. |
| void Serialize | ( | ref float | value | ) |
Serializes or deserializes a float value.
| value | The float value to serialize/deserialize. |
| void Serialize | ( | ref int | value | ) |
Serializes or deserializes a 32-bit integer value.
| value | The 32-bit integer value to serialize/deserialize. |
| void Serialize | ( | ref int | value, |
| int | bits | ||
| ) |
Serializes or deserializes a 32-bit integer value with a specified number of bits.
| value | The 32-bit integer value to serialize/deserialize. |
| bits | The number of bits to use for serialization/deserialization. |
| void Serialize | ( | ref Int32[] | value | ) |
Serializes or deserializes an array of 32-bit integers.
| value | The array of 32-bit integers to serialize/deserialize. |
| void Serialize | ( | ref Int64 | value | ) |
Serializes or deserializes a 64-bit integer value.
| value | The 64-bit integer value to serialize/deserialize. |
| void Serialize | ( | ref String | value | ) |
Serializes or deserializes a string value.
| value | The string value to serialize/deserialize. |
| void Serialize | ( | ref uint | value | ) |
Serializes or deserializes a 32-bit unsigned integer value.
| value | The 32-bit unsigned integer value to serialize/deserialize. |
| void Serialize | ( | ref uint | value, |
| int | bits | ||
| ) |
Serializes or deserializes a 32-bit unsigned integer value with a specified number of bits.
| value | The 32-bit unsigned integer value to serialize/deserialize. |
| bits | The number of bits to use for serialization/deserialization. |
| void Serialize | ( | ref UInt64 | value | ) |
Serializes or deserializes a 64-bit unsigned integer value.
| value | The 64-bit unsigned integer value to serialize/deserialize. |
| void Serialize | ( | ref ulong | value, |
| int | bits | ||
| ) |
Serializes or deserializes a 64-bit unsigned integer value with a specified number of bits.
| value | The 64-bit unsigned integer value to serialize/deserialize. |
| bits | The number of bits to use for serialization/deserialization. |
| unsafe void Serialize | ( | sbyte * | v | ) |
Serializes or deserializes a signed byte value.
| v | The signed byte value to serialize/deserialize. |
| unsafe void Serialize | ( | short * | v | ) |
Serializes or deserializes a short value.
| v | The short value to serialize/deserialize. |
| unsafe void Serialize | ( | uint * | v | ) |
Serializes or deserializes an unsigned 32-bit integer value.
| v | The unsigned 32-bit integer value to serialize/deserialize. |
| unsafe void Serialize | ( | uint * | v, |
| int | bits | ||
| ) |
Serializes or deserializes an unsigned 32-bit integer value with a specified number of bits.
| v | The unsigned 32-bit integer value to serialize/deserialize. |
| bits | The number of bits to use for serialization/deserialization. |
| unsafe void Serialize | ( | ulong * | v | ) |
Serializes or deserializes an unsigned 64-bit integer value.
| v | The unsigned 64-bit integer value to serialize/deserialize. |
| unsafe void Serialize | ( | ushort * | v | ) |
Serializes or deserializes an unsigned short value.
| v | The unsigned short value to serialize/deserialize. |
| void SerializeArray< T > | ( | ref T[] | array, |
| ArrayElementSerializer< T > | serializer | ||
| ) |
Serializes or deserializes an array of elements using a specified serializer.
| T | The type of the array elements. |
| array | The array to serialize/deserialize. |
| serializer | The serializer to use for each element. |
| void SerializeArrayLength< T > | ( | ref T[] | array | ) |
Serializes or deserializes the length of an array.
| T | The type of the array elements. |
| array | The array whose length to serialize/deserialize. |
| unsafe void SerializeBuffer | ( | byte * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of byte values.
| buffer | The buffer of byte values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | int * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of 32-bit integer values.
| buffer | The buffer of 32-bit integer values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | long * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of 64-bit integer values.
| buffer | The buffer of 64-bit integer values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | sbyte * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of signed byte values.
| buffer | The buffer of signed byte values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | short * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of short values.
| buffer | The buffer of short values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | uint * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of unsigned 32-bit integer values.
| buffer | The buffer of unsigned 32-bit integer values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | ulong * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of unsigned 64-bit integer values.
| buffer | The buffer of unsigned 64-bit integer values to serialize/deserialize. |
| length | The length of the buffer. |
| unsafe void SerializeBuffer | ( | ushort * | buffer, |
| int | length | ||
| ) |
Serializes or deserializes a buffer of unsigned short values.
| buffer | The buffer of unsigned short values to serialize/deserialize. |
| length | The length of the buffer. |
| void SetBuffer | ( | byte[] | arr | ) |
Sets the internal buffer to the specified byte array.
| arr | The byte array to use as the internal buffer. |
| void SetBuffer | ( | byte[] | arr, |
| int | size | ||
| ) |
Sets the internal buffer to the specified byte array and size.
| arr | The byte array to use as the internal buffer. |
| size | The size of the byte array in bytes. |
| byte [] ToArray | ( | ) |
Converts the internal buffer to a byte array.
| bool WriteBool | ( | bool | value | ) |
Writes a boolean value to the stream.
| value | The boolean value to write. |
| bool WriteBoolean | ( | bool | value | ) |
Writes a boolean value to the stream.
| value | The boolean value to write. |
| void WriteByte | ( | byte | value | ) |
Writes a byte value to the stream.
| value | The byte value to write. |
| void WriteByte | ( | byte | value, |
| int | bits | ||
| ) |
Writes a byte value to the stream with a specified number of bits.
| value | The byte value to write. |
| bits | The number of bits to write. |
| void WriteByteArray | ( | byte[] | from | ) |
Writes a byte array to the stream.
| from | The byte array to write. |
| void WriteByteArray | ( | byte[] | from, |
| int | count | ||
| ) |
Writes a specified number of bytes from a byte array to the stream.
| from | The byte array to write from. |
| count | The number of bytes to write. |
| void WriteByteArray | ( | byte[] | from, |
| int | offset, | ||
| int | count | ||
| ) |
Writes a specified number of bytes from a byte array to the stream starting at a given offset.
| from | The byte array to write from. |
| offset | The starting offset in the byte array. |
| count | The number of bytes to write. |
| void WriteByteArrayLengthPrefixed | ( | byte[] | array | ) |
Writes a byte array to the stream with a length prefix.
| array | The byte array to write. |
| void WriteByteArrayLengthPrefixed | ( | byte[] | array, |
| int | maxLength | ||
| ) |
Writes a byte array to the stream with a length prefix and a specified maximum length.
| array | The byte array to write. |
| maxLength | The maximum length of the byte array to write. |
|
static |
Writes a byte value at a specified bit position in a byte array.
| data | The byte array to write to. |
| ptr | The bit position to start writing at. |
| bits | The number of bits to write. |
| value | The byte value to write. |
| void WriteChar | ( | Char | value | ) |
Writes a character value to the stream.
| value | The character value to write. |
| void WriteDouble | ( | double | value | ) |
Writes a 64-bit floating point value to the stream.
| value | The 64-bit floating point value to write. |
| void WriteFloat | ( | float | value | ) |
Writes a 32-bit floating point value to the stream.
| value | The 32-bit floating point value to write. |
| void WriteGuid | ( | Guid | guid | ) |
Writes a GUID to the stream.
| guid | The GUID to write. |
| void WriteInt | ( | int | value | ) |
Writes a 32-bit integer value to the stream.
| value | The 32-bit integer value to write. |
| void WriteInt | ( | int | value, |
| int | bits | ||
| ) |
Writes a 32-bit integer value to the stream with a specified number of bits.
| value | The 32-bit integer value to write. |
| bits | The number of bits to write. |
| void WriteInt_Shifted | ( | int | value, |
| int | bits, | ||
| int | shift | ||
| ) |
Writes a shifted 32-bit integer value to the stream with a specified number of bits.
| value | The 32-bit integer value to write. |
| bits | The number of bits to write. |
| shift | The number of bits to shift. |
| void WriteLong | ( | long | value | ) |
Writes a signed 64-bit integer value to the stream.
| value | The signed 64-bit integer value to write. |
| void WriteLong | ( | long | value, |
| int | bits | ||
| ) |
Writes a signed 64-bit integer value to the stream with a specified number of bits.
| value | The signed 64-bit integer value to write. |
| bits | The number of bits to write. |
| void WriteSByte | ( | sbyte | value | ) |
Writes a signed byte value to the stream.
| value | The signed byte value to write. |
| void WriteShort | ( | short | value | ) |
Writes a short value to the stream.
| value | The short value to write. |
| void WriteShort | ( | short | value, |
| int | bits | ||
| ) |
Writes a short value to the stream with a specified number of bits.
| value | The short value to write. |
| bits | The number of bits to write. |
| void WriteString | ( | string | value | ) |
Writes a string to the stream using UTF-8 encoding.
| value | The string to write. |
| void WriteString | ( | string | value, |
| Encoding | encoding | ||
| ) |
Writes a string to the stream using the specified encoding.
| value | The string to write. |
| encoding | The encoding to use for the string. |
| void WriteUInt | ( | uint | value | ) |
Writes an unsigned 32-bit integer value to the stream.
| value | The unsigned 32-bit integer value to write. |
| void WriteUInt | ( | uint | value, |
| int | bits | ||
| ) |
Writes an unsigned 32-bit integer value to the stream with a specified number of bits.
| value | The unsigned 32-bit integer value to write. |
| bits | The number of bits to write. |
| void WriteULong | ( | ulong | value | ) |
Writes an unsigned 64-bit integer value to the stream.
| value | The unsigned 64-bit integer value to write. |
| void WriteULong | ( | ulong | value, |
| int | bits | ||
| ) |
Writes an unsigned 64-bit integer value to the stream with a specified number of bits.
| value | The unsigned 64-bit integer value to write. |
| bits | The number of bits to write. |
| void WriteUShort | ( | ushort | value | ) |
Writes an unsigned short value to the stream.
| value | The unsigned short value to write. |
| void WriteUShort | ( | ushort | value, |
| int | bits | ||
| ) |
Writes an unsigned short value to the stream with a specified number of bits.
| value | The unsigned short value to write. |
| bits | The number of bits to write. |
|
get |
Size of written buffer in BYTES Ammount of bytes required considering the total of written bytes
|
get |
Total Size in BYTES of the Buffer
|
get |
Internal Byte Array
|
get |
Signal if the buffer was completely written
|
get |
Gets a value indicating whether the current position is at an even byte boundary.
|
get |
Signal if the buffer is overflowing
|
getset |
Current read/write position in BITS inside the Buffer
|
getset |
Signal if the Buffer is in Read Mode
|
getset |
Total size in BITS of the buffer
|
getset |
Signal if the Buffer is in Write Mode