public void testRemainingChunkTypes() throws Exception {
final FileInputStream isSz = new FileInputStream(getFile("mixed.txt.sz"));
final ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
final FramedSnappyCompressorInputStream in = new FramedSnappyCompressorInputStream(isSz);
IOUtils.copy(in, out);
out.close();
} finally {
isSz.close();
}
assertArrayEquals(new byte[] { '1', '2', '3', '4',
'5', '6', '7', '8', '9',
'5', '6', '7', '8', '9',
'5', '6', '7', '8', '9',
'5', '6', '7', '8', '9',
'5', '6', '7', '8', '9', 10,
'1', '2', '3', '4',
'1', '2', '3', '4',
}, out.toByteArray());
}
|