StudentWritingCParserInternal::LWZDecoder Struct Reference documentation

StudentWritingCParserInternal::LWZDecoder Struct Reference

a basic LWZ decoder More...

## Classes
struct | LWZEntry

## Public Member Functions
| LWZDecoder (unsigned char const *data, unsigned long len)
| constructor
bool | decode (std::vector< unsigned char > &output)
| decode data

## Static Public Attributes
static int const | e_firstCode =(1<<8)
static int const | e_maxCodeLen =14
static int const | e_maxCode =(1<<e_maxCodeLen)

## Protected Member Functions
void | initDictionary ()
unsigned | getBit () const
unsigned | getCodeWord (unsigned codeLen) const
unsigned char | decodeRec (unsigned int code, std::vector< unsigned char > &output)
| LWZDecoder (LWZDecoder const &)=delete
LWZDecoder & | operator= (LWZDecoder const &)=delete

## Protected Attributes
unsigned char const * | m_data
unsigned long | m_len
unsigned long | m_pos
unsigned long | m_bit
std::vector< LWZEntry > | m_dictionary

## Detailed Description

a basic LWZ decoder

Note
  this code is freely inspired from https://github.com/MichaelDipperstein/lzw GLP 3

## Constructor & Destructor Documentation

## ◆ LWZDecoder() [1/2]

StudentWritingCParserInternal::LWZDecoder::LWZDecoder | ( | unsigned char const * | data,
|  | unsigned long | len )
| inline

constructor

Referenced by LWZDecoder(), and operator=().

## ◆ LWZDecoder() [2/2]

StudentWritingCParserInternal::LWZDecoder::LWZDecoder | ( | LWZDecoder const & |  | ) |
| protecteddelete

## Member Function Documentation

## ◆ decode()

bool StudentWritingCParserInternal::LWZDecoder::decode | ( | std::vector< unsigned char > & | output | ) |

decode data

Referenced by StudentWritingCParser::decode().

## ◆ decodeRec()

unsigned char StudentWritingCParserInternal::LWZDecoder::decodeRec | ( | unsigned int | code,
|  | std::vector< unsigned char > & | output )
| inlineprotected

Referenced by decode(), and decodeRec().

## ◆ getBit()

unsigned StudentWritingCParserInternal::LWZDecoder::getBit | ( |  | ) | const
| inlineprotected

Referenced by getCodeWord().

## ◆ getCodeWord()

unsigned StudentWritingCParserInternal::LWZDecoder::getCodeWord | ( | unsigned | codeLen | ) | const
| inlineprotected

Referenced by decode().

## ◆ initDictionary()

void StudentWritingCParserInternal::LWZDecoder::initDictionary | ( |  | ) |
| inlineprotected

Referenced by decode(), and LWZDecoder().

## ◆ operator=()

LWZDecoder & StudentWritingCParserInternal::LWZDecoder::operator= | ( | LWZDecoder const & |  | ) |
| protecteddelete

## Member Data Documentation

## ◆ e_firstCode

int const StudentWritingCParserInternal::LWZDecoder::e_firstCode =(1<<8)
| static

Referenced by decode(), decodeRec(), and initDictionary().

## ◆ e_maxCode

int const StudentWritingCParserInternal::LWZDecoder::e_maxCode =(1<<e_maxCodeLen)
| static

Referenced by decode(), and initDictionary().

## ◆ e_maxCodeLen

int const StudentWritingCParserInternal::LWZDecoder::e_maxCodeLen =14
| static

## ◆ m_bit

unsigned long StudentWritingCParserInternal::LWZDecoder::m_bit
| protected

Referenced by getBit(), getCodeWord(), and LWZDecoder().

## ◆ m_data

unsigned char const* StudentWritingCParserInternal::LWZDecoder::m_data
| protected

Referenced by getBit(), getCodeWord(), and LWZDecoder().

## ◆ m_dictionary

std::vector<LWZEntry> StudentWritingCParserInternal::LWZDecoder::m_dictionary
| protected

Referenced by decode(), decodeRec(), initDictionary(), and LWZDecoder().

## ◆ m_len

unsigned long StudentWritingCParserInternal::LWZDecoder::m_len
| protected

Referenced by decode(), getBit(), getCodeWord(), and LWZDecoder().

## ◆ m_pos

unsigned long StudentWritingCParserInternal::LWZDecoder::m_pos
| mutableprotected

Referenced by decode(), getBit(), getCodeWord(), and LWZDecoder().

The documentation for this struct was generated from the following file:

- StudentWritingCParser.cxx