1 #ifndef CRYPTOPP_ZINFLATE_H 2 #define CRYPTOPP_ZINFLATE_H 17 : m_store(store), m_buffer(0), m_bitsBuffered(0) {}
20 bool FillBuffer(
unsigned int length);
21 unsigned long PeekBits(
unsigned int length);
22 void SkipBits(
unsigned int length);
23 unsigned long GetBits(
unsigned int length);
50 void Initialize(
const unsigned int *codeBitLengths,
unsigned int nCodes);
51 unsigned int Decode(code_t
code, value_t &value)
const;
59 CodeInfo(code_t code=0,
unsigned int len=0, value_t value=0) : code(code), len(len), value(value) {}
81 static code_t
NormalizeCode(code_t code,
unsigned int codeBits);
86 mutable std::vector<LookupEntry, AllocatorWithCleanup<LookupEntry> >
m_cache;
111 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
112 bool IsolatedFlush(
bool hardFlush,
bool blocking);
123 {AttachedTransformation()->Put(
string, length);}
127 void ProcessInput(
bool flush);
131 void OutputByte(
byte b);
132 void OutputString(
const byte *
string,
size_t length);
133 void OutputPast(
unsigned int length,
unsigned int distance);
146 enum NextDecode {LITERAL, LENGTH_BITS, DISTANCE, DISTANCE_BITS};
Base class for all exceptions thrown by the library.
unsigned int m_bitsBuffered
virtual void ProcessDecompressedData(const byte *string, size_t length)
const char * what() const
Retrieves a C-string describing the exception.
ErrorType
Error types or categories.
Err(const std::string &what)
Exception(ErrorType errorType, const std::string &s)
Construct a new Exception.
std::vector< LookupEntry, AllocatorWithCleanup< LookupEntry > > m_cache
#define NAMESPACE_BEGIN(x)
Abstract base classes that provide a uniform interface to this library.
virtual unsigned int GetLog2WindowSize() const
virtual void ProcessPrestreamHeader()
static code_t NormalizeCode(code_t code, unsigned int codeBits)
virtual void ProcessPoststreamTail()
bool operator<(const CodeInfo &rhs) const
unsigned int m_maxCodeBits
Classes and functions for secure memory allocations.
Input data was received that did not conform to expected format.
virtual unsigned int MaxPrestreamHeaderSize() const
HuffmanDecoder m_dynamicLiteralDecoder
void Initialize(const unsigned int *codeBitLengths, unsigned int nCodes)
unsigned int m_normalizedCacheMask
CodeInfo(code_t code=0, unsigned int len=0, value_t value=0)
HuffmanDecoder(const unsigned int *codeBitLengths, unsigned int nCodes)
Data structure used to store byte strings.
std::vector< CodeInfo, AllocatorWithCleanup< CodeInfo > > m_codeToValue
void FillCacheEntry(LookupEntry &entry, code_t normalizedCode) const
Implementation of BufferedTransformation's attachment interface.
unsigned int BitsBuffered() const
DEFLATE decompressor (RFC 1951)
Provides auto signaling support.
LowFirstBitReader(BufferedTransformation &store)
std::vector< char * > parameters
unsigned long PeekBuffer() const
Err(ErrorType e, const std::string &s)
BufferedTransformation & m_store
virtual unsigned int MaxPoststreamTailSize() const
LowFirstBitReader m_reader
unsigned int Decode(code_t code, value_t &value) const
Interface for retrieving values given their names.