probe(out.toByteArray_clear());
}
}
public void probe(byte[] input) {
LZSSCodec codec = new LZSSCodec();
byte[] compressed = codec.compress(input);
byte[] decompressed = codec.decompress(compressed);
ArrayAssert.assertEquals(input, decompressed);
float ratio = (float) compressed.length / (float) input.length;
System.out.println("Original: " + input.length + ", Compressed: " + compressed.length
+ ", Compression ratio: " + Float.toString(ratio * 100.0f));
}