Closed dain closed 8 years ago
The example code is incorrect. It uses the Hadoop wrapper on the LZO block compressor. The Hadoop wrapper adds additional framing to the compressed blocks. In Aircompressor, the equivalent class is HadoopLzoInputStream and using this code instead works:
HadoopLzoInputStream hadoopLzoInputStream = new HadoopLzoInputStream(new ByteArrayInputStream(compressed), 1000);
byte[] streamOutput = toByteArray(hadoopLzoInputStream);
System.out.println(Arrays.toString(streamOutput));
Comment from @nezihyigitbasi