Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Codec_ZLibNone Class Reference
Inheritance diagram for Codec_ZLibNone:
Collaboration diagram for Codec_ZLibNone:

Public Member Functions

 Codec_ZLibNone ()
 
virtual ~Codec_ZLibNone ()
 
virtual size_t MaxOutputSize (size_t inSize) const
 
virtual Status Reset ()
 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)
 process (i.e. More...
 
virtual Status Finish (u32 &checksum, size_t &outProduced)
 Flush buffers and make sure all output has been produced. More...
 
- Public Member Functions inherited from Codec_ZLib
u32 UpdateChecksum (u32 checksum, const u8 *in, size_t inSize) const
 update a checksum to reflect the contents of a buffer. More...
 
- Public Member Functions inherited from ICodec
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...
 

Private Attributes

u32 m_checksum
 

Additional Inherited Members

- Protected Member Functions inherited from Codec_ZLib
u32 InitializeChecksum ()
 

Constructor & Destructor Documentation

◆ Codec_ZLibNone()

Codec_ZLibNone::Codec_ZLibNone ( )
inline

◆ ~Codec_ZLibNone()

virtual Codec_ZLibNone::~Codec_ZLibNone ( )
inlinevirtual

Member Function Documentation

◆ Finish()

virtual Status Codec_ZLibNone::Finish ( u32 checksum,
size_t &  outProduced 
)
inlinevirtual

Flush buffers and make sure all output has been produced.

Parameters
checksumChecksum over all input data.
outProduced
Returns
error status for the entire operation.

Implements ICodec.

◆ MaxOutputSize()

virtual size_t Codec_ZLibNone::MaxOutputSize ( size_t  inSize) const
inlinevirtual
Returns
an upper bound on the output size for the given amount of input. this is used when allocating a single buffer for the whole operation.

Implements ICodec.

◆ Process()

virtual Status Codec_ZLibNone::Process ( const u8 in,
size_t  inSize,
u8 out,
size_t  outSize,
size_t &  inConsumed,
size_t &  outProduced 
)
inlinevirtual

process (i.e.

compress or decompress) data.

Parameters
in
inSize
out
outSizeBytes remaining in the output buffer; shall not be zero.
inConsumed,outProducedHow 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.

Implements ICodec.

◆ Reset()

virtual Status Codec_ZLibNone::Reset ( )
inlinevirtual

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).

Implements ICodec.

Member Data Documentation

◆ m_checksum

u32 Codec_ZLibNone::m_checksum
private

The documentation for this class was generated from the following file: