1 #ifndef CRYPTOPP_GZIP_H
2 #define CRYPTOPP_GZIP_H
8 NAMESPACE_BEGIN(CryptoPP)
14 Gzip(
BufferedTransformation *attachment=NULL,
unsigned int deflateLevel=DEFAULT_DEFLATE_LEVEL,
unsigned int log2WindowSize=DEFAULT_LOG2_WINDOW_SIZE,
bool detectUncompressible=
true)
15 : Deflator(attachment, deflateLevel, log2WindowSize, detectUncompressible) {}
17 : Deflator(parameters, attachment) {}
20 enum {MAGIC1=0x1f, MAGIC2=0x8b,
21 DEFLATED=8, FAST=4, SLOW=2};
23 void WritePrestreamHeader();
24 void ProcessUncompressedData(
const byte *
string,
size_t length);
25 void WritePoststreamTail();
47 enum {MAGIC1=0x1f, MAGIC2=0x8b,
51 CONTINUED=2, EXTRA_FIELDS=4, FILENAME=8, COMMENTS=16, ENCRYPTED=32};
53 unsigned int MaxPrestreamHeaderSize()
const {
return 1024;}
54 void ProcessPrestreamHeader();
55 void ProcessDecompressedData(
const byte *
string,
size_t length);
56 unsigned int MaxPoststreamTailSize()
const {
return 8;}
57 void ProcessPoststreamTail();
GZIP Decompression (RFC 1952)
DEFLATE (RFC 1951) compressor.
data integerity check (such as CRC or MAC) failed
Gunzip(BufferedTransformation *attachment=NULL, bool repeat=false, int autoSignalPropagation=-1)
received input data that doesn't conform to expected format
DEFLATE (RFC 1951) decompressor.
GZIP Compression (RFC 1952)
CRC Checksum Calculation.
interface for retrieving values given their names