private static void skipDynamicBlock(ByteArray input, int[] bitIndex) throws FormatException { // 3.2.7 Compression with dynamic Huffman codes (BTYPE=10) // Read 2 tables. One is a table to convert "code value of literal/length // alphabet" into "literal/length symbol". The other is a table to convert // "code value of distance alphabet" into "distance symbol". Huffman[] tables = new Huffman[2]; DeflateUtil.readDynamicTables(input, bitIndex, tables); skipData(input, bitIndex, tables[0], tables[1]); }
private static void inflateDynamicBlock( ByteArray input, int[] bitIndex, ByteArray output) throws FormatException { // 3.2.7 Compression with dynamic Huffman codes (BTYPE=10) // Read 2 tables. One is a table to convert "code value of literal/length // alphabet" into "literal/length symbol". The other is a table to convert // "code value of distance alphabet" into "distance symbol". Huffman[] tables = new Huffman[2]; DeflateUtil.readDynamicTables(input, bitIndex, tables); // The actual compressed data of this block. The data are encoded using // the literal/length and distance Huffman codes that were parsed above. inflateData(input, bitIndex, output, tables[0], tables[1]); }
private static void skipDynamicBlock(ByteArray input, int[] bitIndex) throws FormatException { // 3.2.7 Compression with dynamic Huffman codes (BTYPE=10) // Read 2 tables. One is a table to convert "code value of literal/length // alphabet" into "literal/length symbol". The other is a table to convert // "code value of distance alphabet" into "distance symbol". Huffman[] tables = new Huffman[2]; DeflateUtil.readDynamicTables(input, bitIndex, tables); skipData(input, bitIndex, tables[0], tables[1]); }
private static void inflateDynamicBlock( ByteArray input, int[] bitIndex, ByteArray output) throws FormatException { // 3.2.7 Compression with dynamic Huffman codes (BTYPE=10) // Read 2 tables. One is a table to convert "code value of literal/length // alphabet" into "literal/length symbol". The other is a table to convert // "code value of distance alphabet" into "distance symbol". Huffman[] tables = new Huffman[2]; DeflateUtil.readDynamicTables(input, bitIndex, tables); // The actual compressed data of this block. The data are encoded using // the literal/length and distance Huffman codes that were parsed above. inflateData(input, bitIndex, output, tables[0], tables[1]); }