Lines Matching full:zipentry
23 #include "ZipEntry.h"
33 * Initialize a new ZipEntry structure from a FILE* positioned at a
39 status_t ZipEntry::initFromCDE(FILE* fp)
112 void ZipEntry::initNew(const char* fileName, const char* comment)
139 * Initialize a new entry, starting with the ZipEntry from a different
144 status_t ZipEntry::initFromExternal(const ZipFile* pZipFile,
145 const ZipEntry* pEntry)
198 status_t ZipEntry::addPadding(int padding)
234 void ZipEntry::copyCDEtoLFH(void)
259 void ZipEntry::setDataInfo(long uncompLen, long compLen, unsigned long crc32,
280 bool ZipEntry::compareHeaders(void) const
338 time_t ZipEntry::getModWhen(void) const
357 void ZipEntry::setModWhen(time_t when)
392 * ZipEntry::LocalFileHeader
402 status_t ZipEntry::LocalFileHeader::read(FILE* fp)
415 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) {
421 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]);
422 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]);
423 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]);
424 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]);
425 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]);
426 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]);
427 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]);
428 mUncompressedSize = ZipEntry::getLongLE(&buf[0x16]);
429 mFileNameLength = ZipEntry::getShortLE(&buf[0x1a]);
430 mExtraFieldLength = ZipEntry::getShortLE(&buf[0x1c]);
469 status_t ZipEntry::LocalFileHeader::write(FILE* fp)
473 ZipEntry::putLongLE(&buf[0x00], kSignature);
474 ZipEntry::putShortLE(&buf[0x04], mVersionToExtract);
475 ZipEntry::putShortLE(&buf[0x06], mGPBitFlag);
476 ZipEntry::putShortLE(&buf[0x08], mCompressionMethod);
477 ZipEntry::putShortLE(&buf[0x0a], mLastModFileTime);
478 ZipEntry::putShortLE(&buf[0x0c], mLastModFileDate);
479 ZipEntry::putLongLE(&buf[0x0e], mCRC32);
480 ZipEntry::putLongLE(&buf[0x12], mCompressedSize);
481 ZipEntry::putLongLE(&buf[0x16], mUncompressedSize);
482 ZipEntry::putShortLE(&buf[0x1a], mFileNameLength);
483 ZipEntry::putShortLE(&buf[0x1c], mExtraFieldLength);
507 void ZipEntry::LocalFileHeader::dump(void) const
525 * ZipEntry::CentralDirEntry
536 status_t ZipEntry::CentralDirEntry::read(FILE* fp)
551 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) {
557 mVersionMadeBy = ZipEntry::getShortLE(&buf[0x04]);
558 mVersionToExtract = ZipEntry::getShortLE(&buf[0x06]);
559 mGPBitFlag = ZipEntry::getShortLE(&buf[0x08]);
560 mCompressionMethod = ZipEntry::getShortLE(&buf[0x0a]);
561 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0c]);
562 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0e]);
563 mCRC32 = ZipEntry::getLongLE(&buf[0x10]);
564 mCompressedSize = ZipEntry::getLongLE(&buf[0x14]);
565 mUncompressedSize = ZipEntry::getLongLE(&buf[0x18]);
566 mFileNameLength = ZipEntry::getShortLE(&buf[0x1c]);
567 mExtraFieldLength = ZipEntry::getShortLE(&buf[0x1e]);
568 mFileCommentLength = ZipEntry::getShortLE(&buf[0x20]);
569 mDiskNumberStart = ZipEntry::getShortLE(&buf[0x22]);
570 mInternalAttrs = ZipEntry::getShortLE(&buf[0x24]);
571 mExternalAttrs = ZipEntry::getLongLE(&buf[0x26]);
572 mLocalHeaderRelOffset = ZipEntry::getLongLE(&buf[0x2a]);
627 status_t ZipEntry::CentralDirEntry::write(FILE* fp)
631 ZipEntry::putLongLE(&buf[0x00], kSignature);
632 ZipEntry::putShortLE(&buf[0x04], mVersionMadeBy);
633 ZipEntry::putShortLE(&buf[0x06], mVersionToExtract);
634 ZipEntry::putShortLE(&buf[0x08], mGPBitFlag);
635 ZipEntry::putShortLE(&buf[0x0a], mCompressionMethod);
636 ZipEntry::putShortLE(&buf[0x0c], mLastModFileTime);
637 ZipEntry::putShortLE(&buf[0x0e], mLastModFileDate);
638 ZipEntry::putLongLE(&buf[0x10], mCRC32);
639 ZipEntry::putLongLE(&buf[0x14], mCompressedSize);
640 ZipEntry::putLongLE(&buf[0x18], mUncompressedSize);
641 ZipEntry::putShortLE(&buf[0x1c], mFileNameLength);
642 ZipEntry::putShortLE(&buf[0x1e], mExtraFieldLength);
643 ZipEntry::putShortLE(&buf[0x20], mFileCommentLength);
644 ZipEntry::putShortLE(&buf[0x22], mDiskNumberStart);
645 ZipEntry::putShortLE(&buf[0x24], mInternalAttrs);
646 ZipEntry::putLongLE(&buf[0x26], mExternalAttrs);
647 ZipEntry::putLongLE(&buf[0x2a], mLocalHeaderRelOffset);
676 void ZipEntry::CentralDirEntry::dump(void) const