}
@Test
public void compress() throws FileNotFoundException, IOException
{
SnappyCompression compress = new SnappyCompression();
RandomAccessFile file = new RandomAccessFile(new File("/tmp/compress-test.txt"), "r");
long chunkSize = 5L*1024*1024;
Iterator<byte[]> it = compress.compress(new AbstractBackupPath.RafInputStream(file), chunkSize);
FileOutputStream ostream = new FileOutputStream("/tmp/test1.snp");
while (it.hasNext())
{
byte[] chunk = it.next();
ostream.write(chunk);