Closed Bug 545316 Opened 14 years ago Closed 14 years ago

Make 7zip library return archive information

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Windows Mobile 6 Professional
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alexp, Assigned: alexp)

References

Details

Attachments

(1 file, 1 obsolete file)

Fennec installer needs to know how much space is needed for the extracted files. Current implementation of 7zip library has only archive extraction functions.
Assignee: nobody → alexp
Blocks: 533383
Attached patch Patch (obsolete) — Splinter Review
Added SzGetArchiveInfo function.
Attachment #426423 - Flags: review?(bugmail)
Comment on attachment 426423 [details] [diff] [review]
Patch


>+
>+/**
>+ * Get information about 7z-archive
>+ *
>+ * @param archiveFileName    Name of the archive
>+ *
>+ * Output parameters:
>+ * @param pUncompressedSize  Pointer to 64 bit integer for the total uncompressed size
>+ * @param pNumberOfFiles     (optional) Pointer to a number of files in the archive
>+ * @param pNumberOfDirs      (optional) Pointer to a number of directories in the archive
>+ */
>+int SzGetArchiveInfo(const WCHAR *archiveName,
>+                     ULONGLONG *pUncompressedSize, DWORD *pNumberOfFiles, DWORD *pNumberOfDirs)
>+{
>+  return SzGetSfxArchiveInfo(archiveName, 0, pUncompressedSize, pNumberOfFiles, pNumberOfDirs);
>+}
Do you need this helper function?  I'd rather we don't add it.

r+ with removed
Attachment #426423 - Flags: review?(bugmail) → review+
(In reply to comment #2)
> >+int SzGetArchiveInfo(const WCHAR *archiveName,
> >+                     ULONGLONG *pUncompressedSize, DWORD *pNumberOfFiles, DWORD *pNumberOfDirs)

> Do you need this helper function?  I'd rather we don't add it.

I just try to keep the library a bit more generic, i.e. work with regular .7z archives. It has already proved to be useful when Joel needed to extract archive on the device for testing purposes.

SzGetSfxArchiveInfo works for regular archives when sfxStubSize=0, just having a separate "generic" function would be easier to understand for a potential user of the library.
Attached patch Patch v1+Splinter Review
Removed the helper function.
Attachment #426423 - Attachment is obsolete: true
Attachment #426877 - Flags: review+
Keywords: checkin-needed
Status: NEW → ASSIGNED
Pushed as: http://hg.mozilla.org/mozilla-central/rev/64e1cfd8ba01
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Component: Windows Mobile → General
QA Contact: mobile-windows → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: