Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
#include <codec.h>
Public Member Functions | |
virtual | ~ICodec () |
note: the implementation should not check whether any data remains - codecs are sometimes destroyed without completing a transfer. More... | |
virtual size_t | MaxOutputSize (size_t inSize) const =0 |
virtual Status | Reset ()=0 |
clear all previous state and prepare for reuse. More... | |
virtual Status | Process (const u8 *in, size_t inSize, u8 *out, size_t outSize, size_t &inConsumed, size_t &outProduced)=0 |
process (i.e. More... | |
virtual Status | Finish (u32 &checksum, size_t &outProduced)=0 |
Flush buffers and make sure all output has been produced. More... | |
virtual u32 | UpdateChecksum (u32 checksum, const u8 *in, size_t inSize) const =0 |
update a checksum to reflect the contents of a buffer. More... | |
|
virtual |
note: the implementation should not check whether any data remains - codecs are sometimes destroyed without completing a transfer.
Flush buffers and make sure all output has been produced.
checksum | Checksum over all input data. |
outProduced |
Implemented in Codec_ZLibNone, Compressor_ZLib, and Decompressor_ZLib.
|
pure virtual |
Implemented in Codec_ZLibNone, Compressor_ZLib, and Decompressor_ZLib.
|
pure virtual |
process (i.e.
compress or decompress) data.
in | |
inSize | |
out | |
outSize | Bytes remaining in the output buffer; shall not be zero. |
inConsumed,outProduced | How many bytes in the input and output buffers were used. either or both of these can be zero if the input size is small or there's not enough output space. |
Implemented in Codec_ZLibNone, Compressor_ZLib, and Decompressor_ZLib.
|
pure virtual |
clear all previous state and prepare for reuse.
this is as if the object were destroyed and re-created, but more efficient since it avoids reallocating a considerable amount of memory (about 200KB for LZ).
Implemented in Codec_ZLibNone, Compressor_ZLib, and Decompressor_ZLib.
|
pure virtual |
update a checksum to reflect the contents of a buffer.
checksum | the initial value (must be 0 on first call) |
in | |
inSize |
Implemented in Codec_ZLib.