Open Bug 961622 Opened 8 years ago Updated 4 years ago

nsIZipWriter: support alignment for individual files


(Core :: Networking: JAR, defect, P5)





(Reporter: swu, Unassigned)


(Whiteboard: [necko-would-take])

This is a follow up bug from bug 959047 comment 8.

To provide more general and flexible support for alignment, we can implement an API as follow, which allows different alignment size for files in a zip.

void addAlignedEntryStream(in AUTF8String aZipEntry, in PRTime aModTime,
                           in int32_t aCompression, in nsIInputStream aStream,
                           in boolean aQueue, in uint32_t aAlignSize);

For each file in zip, we need to save the aligment size in the extra field.
Below is a proposed Mozilla proprietary extra field.

   Value        Size        Description
   -----        ----        -----------
   0xAA01       2 bytes     Tag for this "extra" block type
   TSize        2 bytes     Size of the store data
   AlignSize    2 bytes     Alignment size
   Padding      Variable    Padding information for alignment

For more information on extra field in zip, please read "Extensible data fields" section in:
Whiteboard: [necko-would-take]
Bulk change to priority:
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.