Merge "Add LFH offset to verbose list of APK" into gingerbread
This commit is contained in:
@ -141,9 +141,9 @@ int doList(Bundle* bundle)
|
|||||||
if (bundle->getVerbose()) {
|
if (bundle->getVerbose()) {
|
||||||
printf("Archive: %s\n", zipFileName);
|
printf("Archive: %s\n", zipFileName);
|
||||||
printf(
|
printf(
|
||||||
" Length Method Size Ratio Date Time CRC-32 Name\n");
|
" Length Method Size Ratio Offset Date Time CRC-32 Name\n");
|
||||||
printf(
|
printf(
|
||||||
"-------- ------ ------- ----- ---- ---- ------ ----\n");
|
"-------- ------ ------- ----- ------- ---- ---- ------ ----\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
totalUncLen = totalCompLen = 0;
|
totalUncLen = totalCompLen = 0;
|
||||||
@ -159,12 +159,13 @@ int doList(Bundle* bundle)
|
|||||||
strftime(dateBuf, sizeof(dateBuf), "%m-%d-%y %H:%M",
|
strftime(dateBuf, sizeof(dateBuf), "%m-%d-%y %H:%M",
|
||||||
localtime(&when));
|
localtime(&when));
|
||||||
|
|
||||||
printf("%8ld %-7.7s %7ld %3d%% %s %08lx %s\n",
|
printf("%8ld %-7.7s %7ld %3d%% %8zd %s %08lx %s\n",
|
||||||
(long) entry->getUncompressedLen(),
|
(long) entry->getUncompressedLen(),
|
||||||
compressionName(entry->getCompressionMethod()),
|
compressionName(entry->getCompressionMethod()),
|
||||||
(long) entry->getCompressedLen(),
|
(long) entry->getCompressedLen(),
|
||||||
calcPercent(entry->getUncompressedLen(),
|
calcPercent(entry->getUncompressedLen(),
|
||||||
entry->getCompressedLen()),
|
entry->getCompressedLen()),
|
||||||
|
(size_t) entry->getLFHOffset(),
|
||||||
dateBuf,
|
dateBuf,
|
||||||
entry->getCRC32(),
|
entry->getCRC32(),
|
||||||
entry->getFileName());
|
entry->getFileName());
|
||||||
|
@ -71,6 +71,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
off_t getCompressedLen(void) const { return mCDE.mCompressedSize; }
|
off_t getCompressedLen(void) const { return mCDE.mCompressedSize; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the offset of the local file header.
|
||||||
|
*/
|
||||||
|
off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the absolute file offset of the start of the compressed or
|
* Return the absolute file offset of the start of the compressed or
|
||||||
* uncompressed data.
|
* uncompressed data.
|
||||||
@ -185,11 +190,6 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void setModWhen(time_t when);
|
void setModWhen(time_t when);
|
||||||
|
|
||||||
/*
|
|
||||||
* Return the offset of the local file header.
|
|
||||||
*/
|
|
||||||
off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the offset of the local file header, relative to the start of
|
* Set the offset of the local file header, relative to the start of
|
||||||
* the current file.
|
* the current file.
|
||||||
|
Reference in New Issue
Block a user