IBufferCodec
Description
- Extended by
-
ColorBuffer sealed
TexelBuffer abstract
Base interface for sample buffers that supporting encoding/decoding of buffer sample blocks to losslessly compressed byte sequences.
Public / Methods
BufferDecode
Decodes a block of samples in this buffer.
- IOException
-
If the binary format input in is malformed.
Public / Attributes
BufferSize
Returns the size in bytes of the uncompressed samples in this buffer.
The returned value is suitable to be used as the initial guess for the output buffer size when calling BufferEncode. If the buffer content exhibits very high entropy, BufferEncode is likely to overflow when using BufferSize. In these cases, increasing the buffer size by a factor of 6/5
will usually be enough. In any case, the return value of BufferEncode must always be inspected and the overflow case must always be handled properly.