Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
HuffmanDecoder Class Reference

Huffman Decoder. More...

#include <zinflate.h>

Classes

struct  CodeInfo
 
class  Err
 
struct  LookupEntry
 

Public Types

enum  { MAX_CODE_BITS = sizeof(code_t)*8 }
 
typedef unsigned int code_t
 
typedef unsigned int value_t
 

Public Member Functions

 HuffmanDecoder ()
 
 HuffmanDecoder (const unsigned int *codeBitLengths, unsigned int nCodes)
 
void Initialize (const unsigned int *codeBitLengths, unsigned int nCodes)
 
unsigned int Decode (code_t code, value_t &value) const
 
bool Decode (LowFirstBitReader &reader, value_t &value) const
 

Private Member Functions

void FillCacheEntry (LookupEntry &entry, code_t normalizedCode) const
 

Static Private Member Functions

static code_t NormalizeCode (code_t code, unsigned int codeBits)
 

Private Attributes

unsigned int m_maxCodeBits
 
unsigned int m_cacheBits
 
unsigned int m_cacheMask
 
unsigned int m_normalizedCacheMask
 
std::vector< CodeInfo, AllocatorWithCleanup< CodeInfo > > m_codeToValue
 
std::vector< LookupEntry, AllocatorWithCleanup< LookupEntry > > m_cache
 

Friends

struct CodeLessThan
 

Detailed Description

Huffman Decoder.

Since
Crypto++ 1.0

Definition at line 36 of file zinflate.h.

Member Typedef Documentation

typedef unsigned int HuffmanDecoder::code_t

Definition at line 39 of file zinflate.h.

typedef unsigned int HuffmanDecoder::value_t

Definition at line 40 of file zinflate.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_CODE_BITS 

Definition at line 41 of file zinflate.h.

Constructor & Destructor Documentation

HuffmanDecoder::HuffmanDecoder ( )
inline

Definition at line 45 of file zinflate.h.

HuffmanDecoder::HuffmanDecoder ( const unsigned int *  codeBitLengths,
unsigned int  nCodes 
)
inline

Definition at line 46 of file zinflate.h.

Here is the call graph for this function:

Member Function Documentation

unsigned int HuffmanDecoder::Decode ( code_t  code,
value_t value 
) const
inline

Definition at line 182 of file zinflate.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool HuffmanDecoder::Decode ( LowFirstBitReader reader,
value_t value 
) const

Definition at line 209 of file zinflate.cpp.

Here is the call graph for this function:

void HuffmanDecoder::FillCacheEntry ( LookupEntry entry,
code_t  normalizedCode 
) const
private

Definition at line 155 of file zinflate.cpp.

void HuffmanDecoder::Initialize ( const unsigned int *  codeBitLengths,
unsigned int  nCodes 
)

Definition at line 65 of file zinflate.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

HuffmanDecoder::code_t HuffmanDecoder::NormalizeCode ( HuffmanDecoder::code_t  code,
unsigned int  codeBits 
)
inlinestaticprivate

Definition at line 60 of file zinflate.cpp.

Friends And Related Function Documentation

friend struct CodeLessThan
friend

Definition at line 55 of file zinflate.h.

Member Data Documentation

std::vector<LookupEntry, AllocatorWithCleanup<LookupEntry> > HuffmanDecoder::m_cache
mutableprivate

Definition at line 86 of file zinflate.h.

unsigned int HuffmanDecoder::m_cacheBits
private

Definition at line 84 of file zinflate.h.

unsigned int HuffmanDecoder::m_cacheMask
private

Definition at line 84 of file zinflate.h.

std::vector<CodeInfo, AllocatorWithCleanup<CodeInfo> > HuffmanDecoder::m_codeToValue
private

Definition at line 85 of file zinflate.h.

unsigned int HuffmanDecoder::m_maxCodeBits
private

Definition at line 84 of file zinflate.h.

unsigned int HuffmanDecoder::m_normalizedCacheMask
private

Definition at line 84 of file zinflate.h.


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