Lines Matching refs:mZipFp
65 assert(mZipFp == NULL); // no reopen in open()
98 mZipFp = fopen(zipFileName, openflags); in open()
99 if (mZipFp == NULL) { in open()
214 fseek(mZipFp, 0, SEEK_END); in readCentralDir()
215 fileLength = ftell(mZipFp); in readCentralDir()
216 rewind(mZipFp); in readCentralDir()
240 if (fseek(mZipFp, seekStart, SEEK_SET) != 0) { in readCentralDir()
247 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in readCentralDir()
248 if (feof(mZipFp)) { in readCentralDir()
302 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in readCentralDir()
317 result = pEntry->initFromCDE(mZipFp); in readCentralDir()
333 if (fread(checkBuf, 1, 4, mZipFp) != 4) { in readCentralDir()
334 if (feof(mZipFp)) { in readCentralDir()
385 assert(mZipFp != NULL); in addCommon()
398 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in addCommon()
416 lfhPosn = ftell(mZipFp); in addCommon()
417 pEntry->mLFH.write(mZipFp); in addCommon()
418 startPosn = ftell(mZipFp); in addCommon()
425 result = compressFpToFp(mZipFp, inputFp, data, size, &crc); in addCommon()
436 long dst = ftell(mZipFp) - startPosn; in addCommon()
447 fseek(mZipFp, startPosn, SEEK_SET); in addCommon()
454 result = copyFpToFp(mZipFp, inputFp, &crc); in addCommon()
456 result = copyDataToFp(mZipFp, data, size, &crc); in addCommon()
474 endPosn = ftell(mZipFp); // seeked to end of compressed data in addCommon()
481 modWhen = getModTime(inputFp ? fileno(inputFp) : fileno(mZipFp)); in addCommon()
492 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) { in addCommon()
496 pEntry->mLFH.write(mZipFp); in addCommon()
525 uint64_t expectedPayloadOffset = ftell(mZipFp) + in alignEntry()
557 assert(mZipFp != NULL); in add()
560 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in add()
588 lfhPosn = ftell(mZipFp); in add()
589 pEntry->mLFH.write(mZipFp); in add()
598 if (fseek(pSourceZip->mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0) in add()
609 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL) in add()
620 endPosn = ftell(mZipFp); in add()
663 assert(mZipFp != NULL); in addRecompress()
666 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in addRecompress()
691 lfhPosn = ftell(mZipFp); in addRecompress()
692 pEntry->mLFH.write(mZipFp); in addRecompress()
693 startPosn = ftell(mZipFp); in addRecompress()
702 if (fseek(pSourceZip->mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0) in addRecompress()
716 long startPosn = ftell(mZipFp); in addRecompress()
718 if (compressFpToFp(mZipFp, NULL, buf, uncompressedLen, &crc) != OK) { in addRecompress()
724 long endPosn = ftell(mZipFp); in addRecompress()
734 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL) in addRecompress()
746 endPosn = ftell(mZipFp); in addRecompress()
760 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) { in addRecompress()
764 pEntry->mLFH.write(mZipFp); in addRecompress()
995 assert(mZipFp != NULL); in flush()
1001 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) in flush()
1007 pEntry->mCDE.write(mZipFp); in flush()
1010 eocdPosn = ftell(mZipFp); in flush()
1013 mEOCD.write(mZipFp); in flush()
1020 if (ftruncate(fileno(mZipFp), ftell(mZipFp)) != 0) { in flush()
1021 ALOGW("ftruncate failed %ld: %s\n", ftell(mZipFp), strerror(errno)); in flush()
1105 result = filemove(mZipFp, pEntry->getLFHOffset() - adjust, in crunchArchive()
1221 assert(mZipFp != NULL);
1224 fd = dup(fileno(mZipFp));
1307 fseek(mZipFp, 0, SEEK_SET); in uncompress()
1310 if (fseek(mZipFp, offset, SEEK_SET) != 0) { in uncompress()
1317 ssize_t amt = fread(buf, 1, unlen, mZipFp); in uncompress()
1338 const FileReader reader(mZipFp); in uncompress()