/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | InflaterTest.java | 49 Inflater inflater = new Inflater(); in assertRoundTrip() local 53 inflater.setInput(deflatedBytes, offset, CHUNK_SIZE); in assertRoundTrip() 58 assertEquals(0, inflater.inflate(new byte[8])); in assertRoundTrip() 60 assertTrue(inflater.needsDictionary()); in assertRoundTrip() 62 assertEquals(adler32(dictionary), inflater.getAdler()); in assertRoundTrip() 63 inflater.setDictionary(dictionary); in assertRoundTrip() 71 if (inflater.needsInput()) { in assertRoundTrip() 73 inflater.setInput(deflatedBytes, offset, nextChunkByteCount); in assertRoundTrip() 76 int inflatedByteCount = inflater.inflate(buf); in assertRoundTrip() 82 inflater.end(); in assertRoundTrip() [all …]
|
D | DeflaterTest.java | 34 private Inflater inflater; field in DeflaterTest 42 inflater = new Inflater(); in setUp() 48 inflater.end(); in tearDown() 62 assertEquals(0, inflater.inflate(decompressed)); in testDeflate() 68 assertEquals(0, inflater.inflate(decompressed)); in testDeflate() 70 inflater.end(); in testDeflate() 71 inflater = new Inflater(true); // safe because we did a FULL_FLUSH in testDeflate() 77 assertEquals(0, inflater.inflate(decompressed)); in testDeflate() 83 assertTrue(inflater.needsInput()); 84 inflater.setInput(compressed, totalDeflated, lastDeflated); [all …]
|
D | OldAndroidDeflateTest.java | 79 Inflater inflater = new Inflater(false); in bigTest() local 85 expand(inflater, comp, (int) deflater.getBytesWritten(), output); in bigTest() 87 assertEquals(inflater.getBytesWritten(), input.length); in bigTest() 88 assertEquals(deflater.getAdler(), inflater.getAdler()); in bigTest() 165 private void expand(Inflater inflater, byte[] inBuf, int inCount, in expand() argument 174 while (!inflater.finished()) { in expand() 178 if (inflater.needsInput() && inCount != 0) { in expand() 181 inflater.setInput(inBuf, inPosn, want); in expand() 190 compCount = inflater.inflate(outBuf, outPosn, LOCAL_BUF_SIZE); in expand()
|
D | OldAndroidZipStressTest.java | 164 Inflater inflater = new Inflater(); in testZipDeflateInflateStress() local 165 inflater.setInput(zipped); in testZipDeflateInflateStress() 166 inflater.finished(); in testZipDeflateInflateStress() 167 inflater.inflate(output); in testZipDeflateInflateStress() 168 inflater.end(); in testZipDeflateInflateStress()
|
/libcore/ojluni/src/test/java/util/zip/ |
D | DeflaterDictionaryTests.java | 93 Inflater inflater = new Inflater(); in testByteArray() local 106 inflater.setInput(output, 0, compressedDataLength); in testByteArray() 108 int resultLength = inflater.inflate(result); in testByteArray() 109 if (inflater.needsDictionary()) { in testByteArray() 111 … inflater.setDictionary(DICTIONARY.getBytes(UTF_8), dictionary_offset, DICTIONARY_LENGTH); in testByteArray() 112 resultLength = inflater.inflate(result); in testByteArray() 116 inflater.finished(); in testByteArray() 118 inflater.getAdler(), resultLength); in testByteArray() 125 inflater.end(); in testByteArray() 141 Inflater inflater = new Inflater(); in testHeapByteBuffer() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | InflaterOutputStreamTest.java | 66 Inflater inflater = new Inflater(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater() local 67 new InflaterOutputStream(os, inflater).close(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater() 70 new InflaterOutputStream(null, inflater); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater() 83 inflater.end(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater() 90 Inflater inflater = new Inflater(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI() local 91 new InflaterOutputStream(os, inflater, 20).close(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI() 101 new InflaterOutputStream(null, inflater, -1); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI() 122 new InflaterOutputStream(os, inflater, 0); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI() 129 new InflaterOutputStream(os, inflater, -10000); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI() 135 inflater.end(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI()
|
D | InflaterTest.java | 479 Inflater inflater = new Inflater(); in testInflateZero() local 480 inflater.setInput(input); in testInflateZero() 483 while (!inflater.finished()) { in testInflateZero() 484 int inflatedChunkSize = inflater.inflate(buffer, numRead, in testInflateZero() 488 inflater.end(); in testInflateZero() 851 Inflater inflater = new Inflater(); in testInflate() local 853 assertEquals(0, inflater.inflate(b)); in testInflate() 854 inflater.end(); in testInflate() 857 inflater = new Inflater(); in testInflate() 858 inflater.setInput(new byte[] { -1 }); in testInflate() [all …]
|