Canvas5Structure::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)

## Static Public Attributes

static int const | e_firstCode =(1<<8)
static int const | e_maxCodeLen =12
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]

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

inline

constructor

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

## LWZDecoder() [2/2]

Canvas5Structure::LWZDecoder::LWZDecoder | ( | LWZDecoder const & |  | ) |

protected delete

## Member Function Documentation

## decode()

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

Referenced by Canvas5Structure::decodeZone5().

## decodeRec()

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

inline protected

Referenced by decode(), and decodeRec().

## getBit()

unsigned Canvas5Structure::LWZDecoder::getBit | ( |  | ) | const

inline protected

Referenced by getCodeWord().

## getCodeWord()

unsigned Canvas5Structure::LWZDecoder::getCodeWord | ( | unsigned | codeLen | ) | const

inline protected

Referenced by decode().

## initDictionary()

void Canvas5Structure::LWZDecoder::initDictionary | ( |  | ) |

inline protected

Referenced by decode(), and LWZDecoder().

## operator=()

LWZDecoder & Canvas5Structure::LWZDecoder::operator= | ( | LWZDecoder const & |  | ) |

protected delete

## Member Data Documentation

## e_firstCode

int const Canvas5Structure::LWZDecoder::e_firstCode =(1<<8)

static

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

## e_maxCode

int const Canvas5Structure::LWZDecoder::e_maxCode =(1<<e_maxCodeLen)

static

Referenced by decode(), and initDictionary().

## e_maxCodeLen

int const Canvas5Structure::LWZDecoder::e_maxCodeLen =12

static

## m_bit

unsigned long Canvas5Structure::LWZDecoder::m_bit

protected

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

## m_data

unsigned char const* Canvas5Structure::LWZDecoder::m_data

protected

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

## m_dictionary

std::vector<LWZEntry> Canvas5Structure::LWZDecoder::m_dictionary

protected

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

## m_len

unsigned long Canvas5Structure::LWZDecoder::m_len

protected

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

## m_pos

unsigned long Canvas5Structure::LWZDecoder::m_pos

mutable protected

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

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

- Canvas5Structure.cxx