Security Scol plugin
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
HuffmanEncoder Class Reference

Huffman Encoder. More...

#include <zdeflate.h>

Classes

struct  Code
 

Public Types

typedef unsigned int code_t
 
typedef unsigned int value_t
 

Public Member Functions

 HuffmanEncoder ()
 Construct a HuffmanEncoder.
 
 HuffmanEncoder (const unsigned int *codeBits, unsigned int nCodes)
 Construct a HuffmanEncoder.
 
void Initialize (const unsigned int *codeBits, unsigned int nCodes)
 Initialize or reinitialize this object.
 
void Encode (LowFirstBitWriter &writer, value_t value) const
 

Static Public Member Functions

static void GenerateCodeLengths (unsigned int *codeBits, unsigned int maxCodeBits, const unsigned int *codeCounts, size_t nCodes)
 

Public Attributes

SecBlock< Codem_valueToCode
 

Detailed Description

Huffman Encoder.

Since
Crypto++ 1.0

Definition at line 41 of file zdeflate.h.

Member Typedef Documentation

◆ code_t

typedef unsigned int HuffmanEncoder::code_t

Definition at line 44 of file zdeflate.h.

◆ value_t

typedef unsigned int HuffmanEncoder::value_t

Definition at line 45 of file zdeflate.h.

Constructor & Destructor Documentation

◆ HuffmanEncoder() [1/2]

HuffmanEncoder::HuffmanEncoder ( )
inline

Construct a HuffmanEncoder.

Definition at line 48 of file zdeflate.h.

◆ HuffmanEncoder() [2/2]

HuffmanEncoder::HuffmanEncoder ( const unsigned int *  codeBits,
unsigned int  nCodes 
)

Construct a HuffmanEncoder.

Parameters
codeBitsa table of code bits
nCodesthe number of codes in the table

Definition at line 94 of file zdeflate.cpp.

Member Function Documentation

◆ Encode()

void HuffmanEncoder::Encode ( LowFirstBitWriter writer,
value_t  value 
) const
inline

Definition at line 231 of file zdeflate.cpp.

◆ GenerateCodeLengths()

void HuffmanEncoder::GenerateCodeLengths ( unsigned int *  codeBits,
unsigned int  maxCodeBits,
const unsigned int *  codeCounts,
size_t  nCodes 
)
static

Definition at line 125 of file zdeflate.cpp.

◆ Initialize()

void HuffmanEncoder::Initialize ( const unsigned int *  codeBits,
unsigned int  nCodes 
)

Initialize or reinitialize this object.

Parameters
codeBitsa table of code bits
nCodesthe number of codes in the table

Definition at line 199 of file zdeflate.cpp.

Member Data Documentation

◆ m_valueToCode

SecBlock<Code> HuffmanEncoder::m_valueToCode

Definition at line 70 of file zdeflate.h.


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