/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | DeflaterTest.java | 33 private Deflater deflater; field in DeflaterTest 41 deflater = new Deflater(); in setUp() 47 deflater.end(); in tearDown() 53 deflater.setInput(new byte[] { 1, 2, 3 }); in testDeflate() 58 deflater.setInput(new byte[] { 4, 5, 6 }); in testDeflate() 64 deflater.setInput(new byte[] { 7, 8, 9 }); in testDeflate() 73 deflater.setInput(new byte[] { 10, 11, 12 }); in testDeflate() 81 int lastDeflated = deflater.deflate(compressed, totalDeflated, 108 deflater.setInput(new byte[] { 1, 2, 3 }); 109 assertEquals(11, deflater.deflate(compressed, 0, compressed.length, Deflater.FULL_FLUSH)); [all …]
|
D | OldAndroidDeflateTest.java | 80 Deflater deflater = new Deflater(Deflater.BEST_COMPRESSION, false); in bigTest() local 84 compress(deflater, input, comp); in bigTest() 85 expand(inflater, comp, (int) deflater.getBytesWritten(), output); in bigTest() 88 assertEquals(deflater.getAdler(), inflater.getAdler()); in bigTest() 89 assertEquals(deflater.getAdler(), expectedAdler); in bigTest() 126 private void compress(Deflater deflater, byte[] inBuf, byte[] outBuf) { in compress() argument 135 while (!deflater.finished()) { in compress() 139 if (deflater.needsInput() && inCount != 0) { in compress() 142 deflater.setInput(inBuf, inPosn, want); in compress() 147 deflater.finish(); in compress() [all …]
|
D | InflaterTest.java | 111 Deflater deflater = new Deflater(); in deflate() local 115 deflater.setDictionary(dictionary); in deflate() 117 deflater.setInput(input); in deflate() 118 deflater.finish(); in deflate() 120 while (!deflater.finished()) { in deflate() 121 int byteCount = deflater.deflate(buf); in deflate() 125 deflater.end(); in deflate()
|
D | OldAndroidZipStressTest.java | 156 Deflater deflater = new Deflater(i); in testZipDeflateInflateStress() local 157 deflater.setInput(input); in testZipDeflateInflateStress() 158 deflater.finish(); in testZipDeflateInflateStress() 159 deflater.deflate(zipped); in testZipDeflateInflateStress() 160 deflater.end(); in testZipDeflateInflateStress()
|
/libcore/ojluni/src/test/java/util/zip/ |
D | DeflaterDictionaryTests.java | 92 Deflater deflater = new Deflater(); in testByteArray() local 96 … deflater.setDictionary(DICTIONARY.getBytes(UTF_8), dictionary_offset, DICTIONARY_LENGTH); in testByteArray() 97 deflater.setInput(input); in testByteArray() 98 deflater.finish(); in testByteArray() 99 … int compressedDataLength = deflater.deflate(output, 0, output.length, Deflater.NO_FLUSH); in testByteArray() 101 " compressed length: %s%n", deflater.getTotalOut(), in testByteArray() 102 deflater.getTotalOut(), compressedDataLength); in testByteArray() 103 deflater.finished(); in testByteArray() 124 deflater.end(); in testByteArray() 140 Deflater deflater = new Deflater(); in testHeapByteBuffer() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | DeflaterInputStreamTest.java | 382 Deflater deflater = new Deflater(); in testDeflaterInputStreamInputStreamDeflater() local 384 new DeflaterInputStream(is, deflater).close(); in testDeflaterInputStreamInputStreamDeflater() 393 new DeflaterInputStream(null, deflater); in testDeflaterInputStreamInputStreamDeflater() 399 deflater.end(); in testDeflaterInputStreamInputStreamDeflater() 408 Deflater deflater = new Deflater(); in testDeflaterInputStreamInputStreamDeflaterInt() local 410 new DeflaterInputStream(is, deflater, 1024); in testDeflaterInputStreamInputStreamDeflaterInt() 419 new DeflaterInputStream(null, deflater, 1024); in testDeflaterInputStreamInputStreamDeflaterInt() 425 new DeflaterInputStream(is, deflater, -1); in testDeflaterInputStreamInputStreamDeflaterInt() 431 new DeflaterInputStream(null, deflater, -1); in testDeflaterInputStreamInputStreamDeflaterInt() 443 deflater.end(); in testDeflaterInputStreamInputStreamDeflaterInt()
|
D | InflaterOutputStreamTest.java | 415 Deflater deflater = new Deflater(); in compressToBytes() local 417 deflater.setInput(input); in compressToBytes() 418 deflater.finish(); in compressToBytes() 419 return deflater.deflate(compressedBytes); in compressToBytes() 421 deflater.end(); in compressToBytes()
|
D | DeflaterTest.java | 1119 Deflater deflater = new Deflater(); in test_deflate_beforeSetInput() local 1120 deflater.finish(); in test_deflate_beforeSetInput() 1122 assertEquals(8, deflater.deflate(buffer)); in test_deflate_beforeSetInput() 1127 deflater.end(); in test_deflate_beforeSetInput()
|