Closed Bug 173615 Opened 22 years ago Closed 9 years ago

Libjar changes to extract the number of files per archive (harness total_entries_archive)

Categories

(Core :: Networking: JAR, defect)

defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jbetak, Assigned: ssu0262)

References

Details

(Keywords: topembed+)

Attachments

(1 file, 1 obsolete file)

We have a new requirement to provide more frequent progress updates, please refer to bug 168139. See bug 81144 for the UI issues to be addressed when this has been implemented.
Adding feedback solicited via private email exchange with sgehani and dveditz: ----- No visible objection. It appears to be mentioned in the appnote [1]. I'd dump (e.g., od -x) archives created by several ``leading'' zip tools including Cygwin's zip, PKZip, WinZip, Sun's jar, et. al. and examine for the existence of this field. ~Samir ----- The number of items in the archive is roughly the same as the number of install steps but usually won't match exactly. A simple archive might have fewer steps than files (some like install.js or directory entries are overhead, some might be conditionally installed). Most will probably have more steps than files (registry entries, shortcut creation, chrome registration, etc). If you've got one long bar that you're progressing along it'll work great as long as you hold at the local expected max for each archive when it goes over a little bit, or jump to catch up at the next stage in the rare case of having fewer. The jumps or pauses might be more noticeable if you go a full 0-100% for each archive. -Dan Veditz
Status: NEW → ASSIGNED
Keywords: topembed
Keywords: topembedtopembed+
Attached patch preliminary (functional) patch (obsolete) — Splinter Review
The patch seems to be working very well, although "total number of entries in the central directory" seems to include files *and* directories. I'll have to rename the helper functions accordingly. Perhaps "GetItemCount" would be more fitting. The following is an excerpt from browser.xpi with two directory entries and three files; GetItemCount == 5 in this case. Archive: browser.xpi Length Date Time Name -------- ---- ---- ---- 0 11-25-02 12:10 bin/ 0 11-25-02 12:10 bin/chrome/ 275673 11-20-02 12:42 bin/chrome/chromelist.txt 299381 11-19-02 00:44 bin/chrome/classic.jar 924765 11-21-02 15:49 bin/chrome/comm.jar Sean, thanks for pointing me to the right direction!
over to me
Assignee: jbetak → ssu
Status: ASSIGNED → NEW
Sean, I had a working build with this patch in it, it worked quite well. Let me know, if you needed it for evaluation purposes.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.4beta
Looking at the patch, I noticed this: + if((ZIP_OpenArchive(szArchive, &vZip)) == ZIP_OK) + { + /* 1st parameter should be NULL or it will fail */ + /* It indicates extract the entire archive */ + iFileCount = ZIP_GetFileCount(vZip); + ZIP_CloseArchive(&vZip); OpenArchive is 'slow' as it reads the full zip index, and builds an hash table for it. Beter would be to create a separate ZIP_GetFileCount(const char * filename), to get the item/file count from a 'closed' zip.
I've got a patch ready to include a 'ZIP_GetItemCount' function to nsZipArchive, without the Open/Close overhead. Will upload it soon.
Any volunteer to compile and test this patch?
Does this depend on bug 214672?
Attachment #107433 - Attachment is obsolete: true
=> Does this depend on bug 214672? No, they are not related at all. ´ZIP_GetFileCount' (second attachment) can very easily be added to the current codebase.
Product: Core → Core Graveyard
Component: Installer: GRE → Networking: JAR
Product: Core Graveyard → Core
QA Contact: carosendahl → networking.jar
Target Milestone: mozilla1.4beta → ---
Any one still interested in this? 4 years of silence means this probably not interesting?
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: