| Modifier and Type | Field and Description |
|---|---|
| public static final long | CLEAR_TABLE
The LZW clear table code. |
| public static final long | EOD
The LZW end of data code. |
| private static final List | |
| private static final Log | LOG
Log instance.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | Returns: a value between 9 and 12the size of the code table tabSize, boolean true for early chunk increase earlyChange)Calculate the appropriate chunk size |
| private static void | |
| private static List | |
| private static List | |
| public DecodeResult | decode(InputStream
the encoded byte stream encoded, OutputStream the stream where decoded data will be written decoded, COSDictionary the parameters used for decoding parameters, int the index to the filter being decoded index)Implements abstract org. Decodes data, producing the original non-encoded data. |
| private static void | |
| protected void | encode(InputStream rawData, OutputStream encoded, COSDictionary parameters)
Implements abstract org.
|
| private static int | Returns: The index of the matching pattern or -1 if nothing is found.The LZW code table. codeTable, byte[] The pattern to be searched for. pattern)Find a matching pattern in the code table. |
| CLEAR_TABLE | back to summary |
|---|---|
| public static final long CLEAR_TABLE The LZW clear table code. | |
| EOD | back to summary |
|---|---|
| public static final long EOD The LZW end of data code. | |
| INITIAL_CODE_TABLE | back to summary |
|---|---|
| private static final List<byte[]> INITIAL_CODE_TABLE | |
| LOG | back to summary |
|---|---|
| private static final Log LOG Hides org. Log instance. | |
| LZWFilter | back to summary |
|---|---|
| public LZWFilter() | |
| calculateChunk | back to summary |
|---|---|
| private static int calculateChunk(int tabSize, boolean earlyChange) Calculate the appropriate chunk size
| |
| checkIndexBounds | back to summary |
|---|---|
| private static void checkIndexBounds(List<byte[]> codeTable, long index, MemoryCacheImageInputStream in) throws IOException | |
| createCodeTable | back to summary |
|---|---|
| private static List Init the code table with 1 byte entries and the EOD and CLEAR_TABLE markers. | |
| createInitialCodeTable | back to summary |
|---|---|
| private static List | |
| decode | back to summary |
|---|---|
| public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException Implements abstract org. Doc from org. Decodes data, producing the original non-encoded data.
| |
| doLZWDecode | back to summary |
|---|---|
| private static void doLZWDecode(InputStream encoded, OutputStream decoded, boolean earlyChange) throws IOException | |
| encode | back to summary |
|---|---|
| protected void encode(InputStream rawData, OutputStream encoded, COSDictionary parameters) throws IOException Implements abstract org.
| |
| findPatternCode | back to summary |
|---|---|
| private static int findPatternCode(List<byte[]> codeTable, byte[] pattern) Find a matching pattern in the code table.
| |