errorCollector.assertEquals(chunk1, chunk2);
}
@Test
public void testLength() throws Exception {
DataAccess zip = zip(testContent1);
InflaterDataAccess ida = new InflaterDataAccess(zip, 0, zip.length(), -1, new Inflater(), new byte[25], null);
errorCollector.assertEquals("Plain #length()", testContent1.length, ida.length());
//
ida = new InflaterDataAccess(zip, 0, zip.length(), -1, new Inflater(), new byte[25], null);
byte[] dummy = new byte[30];
ida.readBytes(dummy, 0, dummy.length);
errorCollector.assertEquals("#length() after readBytes()", testContent1.length, ida.length());
//
ida = new InflaterDataAccess(zip, 0, zip.length(), -1, new Inflater(), new byte[25], null);
// consume most of the stream, so that all original compressed data is already read
dummy = new byte[testContent1.length - 1];
ida.readBytes(dummy, 0, dummy.length);
errorCollector.assertEquals("#length() after origin was completely read", testContent1.length, ida.length());
//