RakNet  4.0
Public Member Functions | List of all members
MemoryCompressor Class Reference

Compress one or more blocks of data. More...

#include <MemoryCompressor.h>

Inherits CompressorBase.

Public Member Functions

bool Compress (char *input, const unsigned inputLength, bool finish)
 
void Clear (void)
 Resets the compressor and all data.
 
- Public Member Functions inherited from CompressorBase
char * GetOutput (void) const
 
unsigned GetTotalOutputSize (void) const
 
unsigned GetTotalInputSize (void) const
 

Detailed Description

Compress one or more blocks of data.

Member Function Documentation

bool MemoryCompressor::Compress ( char *  input,
const unsigned  inputLength,
bool  finish 
)

Compress a block of data. Pass true to finish if this is the last block in the series. If you don't know if it's the last block, you can call it again with 0 for inputLength

Note
Data passed to input isn't necessarily immediately compressed to output. You can force a write by passing true to finish. Multiple calls concatenate the written data.
Parameters
[in]inputA pointer to a block of data
[in]inputLengthThe length of input
[in]finishWrite the last of the data.

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