wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
wxPdfLzwDecoder Class Reference

Class representing an LZW decoder. (For internal use only) More...

#include <pdfparser.h>

Public Member Functions

 wxPdfLzwDecoder ()
 Constructor.
 
virtual ~wxPdfLzwDecoder ()
 Destructor.
 
int GetNextCode ()
 Get next code from the encoded stream.
 
bool Decode (wxMemoryInputStream *dataIn, wxMemoryOutputStream *dataOut)
 Decode a byte stream.
 
void InitializeStringTable ()
 Initialize the string table with initial 256 entries.
 
void WriteString (int code)
 Write decoded string associated with code into output buffer.
 
void AddStringToTable (int oldCode, char newString)
 Add a new string to the string table.
 

Detailed Description

Class representing an LZW decoder. (For internal use only)

Decodes streams that use the Lempel-Ziv-Welch (LZW) compression algorithm, commonly used in PDF and TIFF files.

Member Function Documentation

◆ AddStringToTable()

void wxPdfLzwDecoder::AddStringToTable ( int  oldCode,
char  newString 
)

Add a new string to the string table.

Parameters
oldCodeThe previous code
newStringThe new character to append

◆ Decode()

bool wxPdfLzwDecoder::Decode ( wxMemoryInputStream *  dataIn,
wxMemoryOutputStream *  dataOut 
)

Decode a byte stream.

Parameters
dataInThe encoded input stream
dataOutThe decoded output stream
Returns
true if successful, false otherwise

◆ GetNextCode()

int wxPdfLzwDecoder::GetNextCode ( )

Get next code from the encoded stream.

Returns
The next LZW code

◆ WriteString()

void wxPdfLzwDecoder::WriteString ( int  code)

Write decoded string associated with code into output buffer.

Parameters
codeThe code to look up in the string table

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