/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | CRC32Test.java | 29 CRC32 crc = new CRC32(); in test_Constructor() local 30 assertEquals("Constructor of CRC32 failed", 0, crc.getValue()); in test_Constructor() 38 CRC32 crc = new CRC32(); in test_getValue() local 40 0, crc.getValue()); in test_getValue() 42 crc.reset(); in test_getValue() 43 crc.update(Integer.MAX_VALUE); in test_getValue() 48 4278190080L, crc.getValue()); in test_getValue() 50 crc.reset(); in test_getValue() 52 crc.update(byteEmpty); in test_getValue() 57 1295764014L, crc.getValue()); in test_getValue() [all …]
|
D | GZIPOutputStreamTest.java | 47 return crc; in getChecksum()
|
D | GZIPInputStreamTest.java | 53 return crc; in getChecksum()
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | CRC32.java | 42 private int crc; field in CRC32 58 crc = update(crc, b); in update() 76 crc = updateBytes(crc, b, off, len); in update() 85 crc = updateBytes(crc, b, 0, b.length); in update() 109 crc = updateByteBuffer(crc, ((DirectBuffer)buffer).address(), pos, rem); in update() 111 crc = updateBytes(crc, buffer.array(), pos + buffer.arrayOffset(), rem); in update() 115 crc = updateBytes(crc, b, 0, b.length); in update() 124 crc = 0; in reset() 131 return (long)crc & 0xffffffffL; in getValue() 134 private native static int update(int crc, int b); in update() argument [all …]
|
D | ZipInputStream.java | 49 private CRC32 crc = new CRC32(); field in ZipInputStream 122 crc.reset(); in getNextEntry() 208 crc.update(b, off, len); in read() 227 crc.update(b, off, len); in read() 229 if (remaining == 0 && entry.crc != crc.getValue()) { in read() 231 "invalid entry CRC (expected 0x" + Long.toHexString(entry.crc) + in read() 232 " but got 0x" + Long.toHexString(crc.getValue()) + ")"); in read() 325 e.crc = get32(tmpbuf, LOCCRC); in readLOC() 366 e.crc = sig; in readEnd() 372 e.crc = get32(tmpbuf, ZIP64_EXTCRC); in readEnd() [all …]
|
D | ZipEntry.java | 53 long crc = -1; // crc-32 of entry data field in ZipEntry 79 public ZipEntry(String name, String comment, long crc, long compressedSize, in ZipEntry() argument 84 this.crc = crc; in ZipEntry() 148 crc = e.crc; in ZipEntry() 411 public void setCrc(long crc) { in setCrc() argument 412 if (crc < 0 || crc > 0xFFFFFFFFL) { in setCrc() 415 this.crc = crc; in setCrc() 427 return crc; in getCrc()
|
D | GZIPInputStream.java | 48 protected CRC32 crc = new CRC32(); field in GZIPInputStream 125 crc.update(buf, off, n); in read() 162 CheckedInputStream in = new CheckedInputStream(this_in, crc); in readHeader() 163 crc.reset(); in readHeader() 197 int v = (int)crc.getValue() & 0xffff; in readHeader() 203 crc.reset(); in readHeader() 223 if ((readUInt(in) != crc.getValue()) || in readTrailer()
|
D | ZipOutputStream.java | 75 private CRC32 crc = new CRC32(); field in ZipOutputStream 210 if (e.size == -1 || e.csize == -1 || e.crc == -1) in putNextEntry() 225 if (e.size == -1 || e.crc == -1) { in putNextEntry() 271 if (e.crc != crc.getValue()) { in closeEntry() 274 Long.toHexString(e.crc) + " but got 0x" + in closeEntry() 275 Long.toHexString(crc.getValue()) + ")"); in closeEntry() 280 e.crc = crc.getValue(); in closeEntry() 293 if (e.crc != crc.getValue()) { in closeEntry() 296 Long.toHexString(e.crc) + " but got 0x" + in closeEntry() 297 Long.toHexString(crc.getValue()) + ")"); in closeEntry() [all …]
|
D | GZIPOutputStream.java | 42 protected CRC32 crc = new CRC32(); field in GZIPOutputStream 95 crc.reset(); in GZIPOutputStream() 146 crc.update(buf, off, len); in write() 201 writeInt((int)crc.getValue(), buf, offset); // CRC-32 of uncompr. data in writeTrailer()
|
D | ZipFile.java | 598 e.crc = getEntryCrc(jzentry); in getZipEntry()
|
/libcore/ojluni/src/main/native/ |
D | java_util_zip_CRC32.c | 40 CRC32_update(JNIEnv *env, jclass cls, jint crc, jint b) in CRC32_update() argument 45 return crc32(crc, buf, 1); in CRC32_update() 49 CRC32_updateBytes(JNIEnv *env, jclass cls, jint crc, in CRC32_updateBytes() argument 54 crc = crc32(crc, buf + off, len); in CRC32_updateBytes() 57 return crc; in CRC32_updateBytes() 61 ZIP_CRC32(jint crc, const jbyte *buf, jint len) in ZIP_CRC32() argument 63 return crc32(crc, (Bytef*)buf, len); in ZIP_CRC32() 67 CRC32_updateByteBuffer(JNIEnv *env, jclass cls, jint crc, in CRC32_updateByteBuffer() argument 72 crc = crc32(crc, buf + off, len); in CRC32_updateByteBuffer() 74 return crc; in CRC32_updateByteBuffer()
|
D | zip_util.h | 165 jint crc; /* crc of uncompressed data */ member
|
D | java_util_zip_ZipFile.c | 249 return (jlong)ze->crc & 0xffffffffUL; in ZipFile_getEntryCrc()
|
D | zip_util.c | 1054 ze->crc = CENCRC(cen); in newEntry()
|
/libcore/support/src/test/java/tests/resources/ |
D | hyts_checkInput.txt | 1 crc.reset(); 2 crc.update(1); 3 //System.out.print("value of crc"+crc.getValue());
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | OldAndroidChecksumTest.java | 56 CRC32 crc = new CRC32(); in cRC32Test() local 59 crc.update(values); in cRC32Test() 60 assertEquals(crc.getValue(), expected); in cRC32Test() 63 crc.reset(); in cRC32Test() 65 crc.update(values[i]); in cRC32Test() 67 assertEquals(crc.getValue(), expected); in cRC32Test()
|
D | AbstractZipFileTest.java | 146 CRC32 crc = new CRC32(); in testStoredEntrySize() local 147 crc.update(buffer); in testStoredEntrySize() 148 outEntry.setCrc(crc.getValue()); in testStoredEntrySize() 263 CRC32 crc = new CRC32(); in testSTORED() local 299 ze.setCrc(crc.getValue()); in testSTORED() 309 ze.setCrc(crc.getValue()); in testSTORED() 329 ze.setCrc(crc.getValue()); in testSTORED() 349 ze.setCrc(crc.getValue()); in testSTORED() 360 ze.setCrc(crc.getValue()); in testSTORED()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ChecksumBenchmark.java | 38 CRC32 crc = new CRC32(); in timeCrc_block() local 40 crc.update(bytes); in timeCrc_block() 44 CRC32 crc = new CRC32(); in timeCrc_byte() local 46 crc.update(1); in timeCrc_byte()
|