| title | PooledBitReader |
|---|---|
| name | PooledBitReader |
| permalink | /api/pooled-bit-reader/ |
Disposable BitReader that returns the Reader to the BitReaderPool when disposed
Gets a PooledBitReader from the static BitReaderPool
``Stream`` stream
PooledBitReader
Changes the underlying stream the reader is reading from
``Stream`` stream
The stream to read from
Reads a single byte
The byte read as an integer
Reads a byte
The byte read
Reads a single bit
The bit read
Reads a single bit
The bit read
Skips pad bits and aligns the position to the next byte
Reads a single boxed object of a given type in a packed format
``Type`` type
The type to read
Returns the boxed read object
Read a single-precision floating point value from the stream.
The read value
Read a double-precision floating point value from the stream.
The read value
Read a single-precision floating point value from the stream from a varint
The read value
Read a double-precision floating point value from the stream as a varint
The read value
Read a Vector2 from the stream.
The Vector2 read from the stream.
Read a Vector2 from the stream.
The Vector2 read from the stream.
Read a Vector3 from the stream.
The Vector3 read from the stream.
Read a Vector3 from the stream.
The Vector3 read from the stream.
Read a Vector4 from the stream.
The Vector4 read from the stream.
Read a Vector4 from the stream.
The Vector4 read from the stream.
Read a Color from the stream.
The Color read from the stream.
Read a Color from the stream.
The Color read from the stream.
Read a Color32 from the stream.
The Color32 read from the stream.
Read a Ray from the stream.
The Ray read from the stream.
Read a Ray from the stream.
The Ray read from the stream.
Read a single-precision floating point value from the stream. The value is between (inclusive) the minValue and maxValue.
``float`` minValue
Minimum value that this value could be
``float`` maxValue
Maximum possible value that this could be
``int`` bytes
How many bytes the compressed value occupies. Must be between 1 and 4 (inclusive)
The read value
read a double-precision floating point value from the stream. The value is between (inclusive) the minValue and maxValue.
``double`` minValue
Minimum value that this value could be
``double`` maxValue
Maximum possible value that this could be
``int`` bytes
How many bytes the compressed value occupies. Must be between 1 and 8 (inclusive)
The read value
Reads the rotation from the stream
The rotation read from the stream
Reads the rotation from the stream
``int`` bytesPerAngle
The rotation read from the stream
Reads the rotation from the stream
The rotation read from the stream
Read a certain amount of bits from the stream.
``int`` bitCount
How many bits to read. Minimum 0, maximum 8.
The bits that were read
Read a certain amount of bits from the stream.
``int`` bitCount
How many bits to read. Minimum 0, maximum 64.
The bits that were read
Read a nibble (4 bits) from the stream.
``bool`` asUpper
Whether or not the nibble should be left-shifted by 4 bits
The nibble that was read
Read a nibble (4 bits) from the stream.
The nibble that was read
Reads a signed byte
Value read from stream.
Read an unsigned short (UInt16) from the stream.
Value read from stream.
Read a signed short (Int16) from the stream.
Value read from stream.
Read a single character from the stream
Value read from stream.
Read an unsigned int (UInt32) from the stream.
Value read from stream.
Read a signed int (Int32) from the stream.
Value read from stream.
Read an unsigned long (UInt64) from the stream.
Value read from stream.
Read a signed long (Int64) from the stream.
Value read from stream.
Read a ZigZag encoded varint signed short (Int16) from the stream.
Decoded un-varinted value.
Read a varint unsigned short (UInt16) from the stream.
Un-varinted value.
Read a varint two-byte character from the stream.
Un-varinted value.
Read a ZigZag encoded varint signed int (Int32) from the stream.
Decoded un-varinted value.
Read a varint unsigned int (UInt32) from the stream.
Un-varinted value.
Read a ZigZag encoded varint signed long(Int64) from the stream.
Decoded un-varinted value.
Read a varint unsigned long (UInt64) from the stream.
Un-varinted value.
Read a string from the stream.
``bool`` oneByteChars
If set to true one byte chars are used and only ASCII is supported.
The string that was read.
Read a string from the stream.
``StringBuilder`` builder
The builder to read the values into or null to use a new builder.
``bool`` oneByteChars
If set to true one byte chars are used and only ASCII is supported.
The string that was read.
Read string encoded as a varint from the stream.
``StringBuilder`` builder
The builder to read the string into or null to use a new builder
The string that was read.
Read string diff from the stream.
``string`` compare
The version to compare the diff to.
``bool`` oneByteChars
If set to true one byte chars are used and only ASCII is supported.
The string based on the diff and the old version.
public ``StringBuilder`` ReadStringDiff(``StringBuilder`` builder, ``string`` compare, ``bool`` oneByteChars);
Read string diff from the stream.
``StringBuilder`` builder
The builder to read the string into or null to use a new builder.
``string`` compare
The version to compare the diff to.
``bool`` oneByteChars
If set to true one byte chars are used and only ASCII is supported.
The string based on the diff and the old version
Read string diff from the stream.
``StringBuilder`` compareAndBuffer
The builder containing the current version and that will also be used as the output buffer.
``bool`` oneByteChars
If set to true one byte chars will be used and only ASCII will be supported.
The string based on the diff and the old version.
Read string diff encoded as varints from the stream.
``string`` compare
The version to compare the diff to.
The string based on the diff and the old version.
Read string diff encoded as varints from the stream.
``StringBuilder`` builder
The builder to read the string into or null to use a new builder.
``string`` compare
The version to compare the diff to.
The string based on the diff and the old version
Read string diff encoded as varints from the stream.
``StringBuilder`` compareAndBuffer
The builder containing the current version and that will also be used as the output buffer.
The string based on the diff and the old version.
Read byte array into an optional buffer from the stream.
``byte[]`` readTo
The array to read into. If the array is not large enough or if it's null. A new array is created.
``long`` knownLength
The length of the array if it's known. Otherwise -1
The byte array that has been read.
Read byte array diff into an optional buffer from the stream.
``byte[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The length of the array if it's known. Otherwise -1
The byte array created from the diff and original.
Read short array from the stream.
``short[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read short array in a packed format from the stream.
``short[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read short array diff from the stream.
``short[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read short array diff in a packed format from the stream.
``short[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read ushort array from the stream.
``ushort[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read ushort array in a packed format from the stream.
``ushort[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read ushort array diff from the stream.
``ushort[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read ushort array diff in a packed format from the stream.
``ushort[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read int array from the stream.
``int[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read int array in a packed format from the stream.
``int[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read int array diff from the stream.
``int[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read int array diff in a packed format from the stream.
``int[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read uint array from the stream.
``uint[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read uint array in a packed format from the stream.
``uint[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read uint array diff from the stream.
``uint[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read long array from the stream.
``long[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read long array in a packed format from the stream.
``long[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read long array diff from the stream.
``long[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read long array diff in a packed format from the stream.
``long[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read ulong array from the stream.
``ulong[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read ulong array in a packed format from the stream.
``ulong[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read ulong array diff from the stream.
``ulong[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read ulong array diff in a packed format from the stream.
``ulong[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read float array from the stream.
``float[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read float array in a packed format from the stream.
``float[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read float array diff from the stream.
``float[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read float array diff in a packed format from the stream.
``float[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read double array from the stream.
``double[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read double array in a packed format from the stream.
``double[]`` readTo
The buffer to read into or null to create a new array
``long`` knownLength
The known length or -1 if unknown
The array read from the stream.
Read double array diff from the stream.
``double[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.
Read double array diff in a packed format from the stream.
``double[]`` readTo
The buffer containing the old version or null.
``long`` knownLength
The known length or -1 if unknown
The array created from the diff and the current version.