check();
}
public void testStreaming() {
StreamingCompressor s = compressor.createStreamingCompressor(outdata, 0, 1);
assertEquals(1, s.add(0, 1));
expected.add(0, 1);
checkNoCompress();
assertEquals(2, s.add(.1, 2));
expected.add(0, 2);
checkNoCompress();
assertEquals(2, s.add(.2, 3));
expected.removeLast(2);
expected.add(0, 1);
expected.add(0, 3);
checkNoCompress();
assertEquals(3, s.add(.3, 2));
expected.add(0, 2);
checkNoCompress();
assertEquals(3, s.add(.4, 2.5));
expected.removeLast(1);
expected.add(0, 2.5);
checkNoCompress();
assertEquals(4, s.add(1, 5));
expected.add(1, 5);
checkNoCompress();
assertEquals(2, s.add(1, 6));
expected.add(1, 6);
checkNoCompress();
}