16 static const
byte DEFLATE_METHOD = 8;
17 static const
byte FDICT_FLAG = (1 << 5);
25 byte cmf =
byte(DEFLATE_METHOD | ((GetLog2WindowSize()-8) << 4));
27 byte flags =
byte(GetCompressionLevel() << 6);
45 static const unsigned int deflateToCompressionLevel[] = {0, 1, 1, 1, 2, 2, 2, 2, 2, 3};
66 if ((cmf*256+flags) % 31 != 0)
69 if ((cmf & 0xf) != DEFLATE_METHOD)
72 if (flags & FDICT_FLAG)
ZlibDecompressor(BufferedTransformation *attachment=NULL, bool repeat=false, int autoSignalPropagation=-1)
Construct a ZlibDecompressor.
void ProcessPrestreamHeader()
#define NAMESPACE_BEGIN(x)
DEFLATE compression and decompression (RFC 1951)
Classes and functions for secure memory allocations.
void WritePoststreamTail()
int GetDeflateLevel() const
Retrieves the deflation level.
ZLIB Compressor (RFC 1950)
BufferedTransformation * AttachedTransformation()
Retrieve attached transformation.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
Fixed size stack-based SecBlock.
#define CRYPTOPP_ASSERT(exp)
DEFLATE decompressor (RFC 1951)
void ProcessDecompressedData(const byte *string, size_t length)
unsigned int m_log2WindowSize
T1 RoundUpToMultipleOf(const T1 &n, const T2 &m)
Rounds a value up to a multiple of a second value.
void ProcessUncompressedData(const byte *string, size_t length)
unsigned int GetCompressionLevel() const
size_t Get(byte &outByte)
Retrieve a 8-bit byte.
void ProcessPoststreamTail()