Lines Matching refs:mZipFp
63 assert(mZipFp == NULL); // no reopen
96 mZipFp = fopen(zipFileName, openflags);
97 if (mZipFp == NULL) {
212 fseek(mZipFp, 0, SEEK_END);
213 fileLength = ftell(mZipFp);
214 rewind(mZipFp);
238 if (fseek(mZipFp, seekStart, SEEK_SET) != 0) {
245 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) {
296 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
311 result = pEntry->initFromCDE(mZipFp);
327 if (fread(checkBuf, 1, 4, mZipFp) != 4) {
376 assert(mZipFp != NULL);
389 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
407 lfhPosn = ftell(mZipFp);
408 pEntry->mLFH.write(mZipFp);
409 startPosn = ftell(mZipFp);
417 result = compressFpToFp(mZipFp, inputFp, data, size, &crc);
428 long dst = ftell(mZipFp) - startPosn;
439 fseek(mZipFp, startPosn, SEEK_SET);
446 result = copyFpToFp(mZipFp, inputFp, &crc);
448 result = copyDataToFp(mZipFp, data, size, &crc);
476 result = copyPartialFpToFp(mZipFp, inputFp, compressedLen, NULL);
493 endPosn = ftell(mZipFp); // seeked to end of compressed data
510 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) {
514 pEntry->mLFH.write(mZipFp);
549 mZipFp != NULL);
552 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
581 lfhPosn = ftell(mZipFp);
582 pEntry->mLFH.write(mZipFp);
591 if (fseek(pSourceZip->mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0)
602 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL)
613 endPosn = ftell(mZipFp);
905 assert(mZipFp != NULL);
911 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0)
917 pEntry->mCDE.write(mZipFp);
920 eocdPosn = ftell(mZipFp);
923 mEOCD.write(mZipFp);
930 if (ftruncate(fileno(mZipFp), ftell(mZipFp)) != 0) {
931 ALOGW("ftruncate failed %ld: %s\n", ftell(mZipFp), strerror(errno));
1015 result = filemove(mZipFp, pEntry->getLFHOffset() - adjust,
1124 assert(mZipFp != NULL);
1127 fd = dup(fileno(mZipFp));
1158 fseek(mZipFp, 0, SEEK_SET);
1161 if (fseek(mZipFp, offset, SEEK_SET) != 0) {
1168 ssize_t amt = fread(buf, 1, unlen, mZipFp);
1189 if (!ZipUtils::inflateToBuffer(mZipFp, buf, unlen, clen)) {