6 #ifndef CRYPTOPP_GZIP_H
7 #define CRYPTOPP_GZIP_H
14 NAMESPACE_BEGIN(CryptoPP)
29 Gzip(
BufferedTransformation *attachment=NULL,
unsigned int deflateLevel=DEFAULT_DEFLATE_LEVEL,
unsigned int log2WindowSize=DEFAULT_LOG2_WINDOW_SIZE,
bool detectUncompressible=
true)
30 : Deflator(attachment, deflateLevel, log2WindowSize, detectUncompressible), m_totalLen(0) {}
36 : Deflator(parameters, attachment), m_totalLen(0) {}
39 enum {MAGIC1=0x1f, MAGIC2=0x8b,
40 DEFLATED=8, FAST=4, SLOW=2};
42 void WritePrestreamHeader();
43 void ProcessUncompressedData(
const byte *
string,
size_t length);
44 void WritePoststreamTail();
87 CONTINUED=2, EXTRA_FIELDS=4, FILENAME=8, COMMENTS=16, ENCRYPTED=32};
89 unsigned int MaxPrestreamHeaderSize()
const {
return 1024;}
90 void ProcessPrestreamHeader();
91 void ProcessDecompressedData(
const byte *
string,
size_t length);
92 unsigned int MaxPoststreamTailSize()
const {
return 8;}
93 void ProcessPoststreamTail();
GZIP Decompression (RFC 1952)
Abstract base classes that provide a uniform interface to this library.
Exception thrown when a CRC error occurs.
DEFLATE compressor (RFC 1951)
Exception thrown when a length error occurs.
Classes for CRC-32 and CRC-32C checksum algorithm.
DEFLATE compression and decompression (RFC 1951)
Data integerity check, such as CRC or MAC, failed.
Gunzip(BufferedTransformation *attachment=NULL, bool repeat=false, int autoSignalPropagation=-1)
Construct a Gunzip decompressor.
Input data was received that did not conform to expected format.
Exception thrown when the tail is too short.
Gzip(const NameValuePairs ¶meters, BufferedTransformation *attachment=NULL)
Construct a Gzip compressor.
DEFLATE (RFC 1951) decompressor.
Gzip(BufferedTransformation *attachment=NULL, unsigned int deflateLevel=DEFAULT_DEFLATE_LEVEL, unsigned int log2WindowSize=DEFAULT_LOG2_WINDOW_SIZE, bool detectUncompressible=true)
Construct a Gzip compressor.
GZIP Compression (RFC 1952)
CRC-32 Checksum Calculation.
Interface for retrieving values given their names.