iText 7 7.1.11 API
|
General purpose LZW String Table. More...
Public Member Functions |
|
LZWStringTable () | |
Constructor allocate memory for string store data More... |
|
virtual int | AddCharString (short index, byte b) |
virtual short | FindCharString (short index, byte b) |
virtual void | ClearTable (int codesize) |
virtual int | ExpandCode (byte[] buf, int offset, short code, int skipHead) |
If expanded data doesn't fit into array only what will fit is written to buf and the return value indicates how much of the expanded code has been written to the buf. More... |
|
virtual void | Dump (StreamWriter output) |
Static Public Member Functions |
|
static int | Hash (short index, byte lastbyte) |
General purpose LZW String Table.
General purpose LZW String Table. Extracted from GIFEncoder by Adam Doppelt Comments added by Robin Luiten expandCode
added by Robin Luiten The strLen_ table to give quick access to the lenght of an expanded code for use by the expandCode
method added by Robin.
|
inline |
Constructor allocate memory for string store data
|
inlinevirtual |
index | value of -1 indicates no predecessor [used in initialization] |
b | the byte [character] to add to the string store which follows the predecessor string specified the index. |
|
inlinevirtual |
codesize | the size of code to be preallocated for the string store. |
|
inlinevirtual |
If expanded data doesn't fit into array only what will fit is written to buf and the return value indicates how much of the expanded code has been written to the buf.
If expanded data doesn't fit into array only what will fit is written to buf and the return value indicates how much of the expanded code has been written to the buf. The next call to expandCode() should be with the same code and have the skip parameter set the negated value of the previous return. Successive negative return values should be negated and added together for next skip parameter value with same code.
buf | buffer to place expanded data into |
offset | offset to place expanded data |
code | the code to expand to the byte array it represents. PRECONDITION This code must already be in the LZSS |
skipHead | is the number of bytes at the start of the expanded code to be skipped before data is written to buf. It is possible that skipHead is equal to codeLen. |
|
inlinevirtual |
index | index to prefix string |
b | the character that follws the index prefix |