Lines Matching refs:mZipFp
63 assert(mZipFp == NULL); // no reopen in open()
96 mZipFp = fopen(zipFileName, openflags); in open()
97 if (mZipFp == NULL) { in open()
212 fseek(mZipFp, 0, SEEK_END); in readCentralDir()
213 fileLength = ftell(mZipFp); in readCentralDir()
214 rewind(mZipFp); in readCentralDir()
238 if (fseek(mZipFp, seekStart, SEEK_SET) != 0) { in readCentralDir()
245 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in readCentralDir()
296 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in readCentralDir()
311 result = pEntry->initFromCDE(mZipFp); in readCentralDir()
327 if (fread(checkBuf, 1, 4, mZipFp) != 4) { in readCentralDir()
376 assert(mZipFp != NULL); in addCommon()
389 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in addCommon()
407 lfhPosn = ftell(mZipFp); in addCommon()
408 pEntry->mLFH.write(mZipFp); in addCommon()
409 startPosn = ftell(mZipFp); in addCommon()
417 result = compressFpToFp(mZipFp, inputFp, data, size, &crc); in addCommon()
428 long dst = ftell(mZipFp) - startPosn; in addCommon()
439 fseek(mZipFp, startPosn, SEEK_SET); in addCommon()
446 result = copyFpToFp(mZipFp, inputFp, &crc); in addCommon()
448 result = copyDataToFp(mZipFp, data, size, &crc); in addCommon()
476 result = copyPartialFpToFp(mZipFp, inputFp, compressedLen, NULL); in addCommon()
493 endPosn = ftell(mZipFp); // seeked to end of compressed data in addCommon()
500 modWhen = getModTime(inputFp ? fileno(inputFp) : fileno(mZipFp)); in addCommon()
511 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) { in addCommon()
515 pEntry->mLFH.write(mZipFp); in addCommon()
550 assert(mZipFp != NULL); in add()
553 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) { in add()
582 lfhPosn = ftell(mZipFp); in add()
583 pEntry->mLFH.write(mZipFp); in add()
592 if (fseek(pSourceZip->mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0) in add()
603 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL) in add()
614 endPosn = ftell(mZipFp); in add()
906 assert(mZipFp != NULL); in flush()
912 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) in flush()
918 pEntry->mCDE.write(mZipFp); in flush()
921 eocdPosn = ftell(mZipFp); in flush()
924 mEOCD.write(mZipFp); in flush()
931 if (ftruncate(fileno(mZipFp), ftell(mZipFp)) != 0) { in flush()
932 ALOGW("ftruncate failed %ld: %s\n", ftell(mZipFp), strerror(errno)); in flush()
1016 result = filemove(mZipFp, pEntry->getLFHOffset() - adjust, in crunchArchive()
1125 assert(mZipFp != NULL);
1128 fd = dup(fileno(mZipFp));
1159 fseek(mZipFp, 0, SEEK_SET); in uncompress()
1162 if (fseek(mZipFp, offset, SEEK_SET) != 0) { in uncompress()
1169 ssize_t amt = fread(buf, 1, unlen, mZipFp); in uncompress()
1190 if (!ZipUtils::inflateToBuffer(mZipFp, buf, unlen, clen)) { in uncompress()