LZWDecodeFilter extends MemoryLimitsAwareFilter { public static byte[] LZWDecode(byte[] in) { return LZWDecodeInternal(in, new ByteArrayOutputStream()); }  static byte[] LZWDecode(byte[] in); @Override byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary);  }
@Test public void decodingTestStatic() { byte[] bytes = {(byte) 0x80, 0x0B, 0x60, 0x50, 0x22, 0x0C, 0x0C, (byte) 0x85, 0x01}; String expectedResult = "-----A---B"; String decoded = new String(LZWDecodeFilter.LZWDecode(bytes)); Assert.assertEquals(expectedResult, decoded); }