[jira] Created: (COMPRESS-99) Return zip entries in the original order

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (COMPRESS-99) Return zip entries in the original order

Richard (Jira)
Return zip entries in the original order
----------------------------------------

                 Key: COMPRESS-99
                 URL: https://issues.apache.org/jira/browse/COMPRESS-99
             Project: Commons Compress
          Issue Type: Improvement
    Affects Versions: 1.0
            Reporter: Trejkaz


We would like ZipFile.getEntries() to return its entries in the original order, instead of the random ordering used at present.

If this cannot be done, we need a way to sort the entries back into the original order ourselves (which at present is not possible either.)


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COMPRESS-99) Return zip entries in the original order

Richard (Jira)

    [ https://issues.apache.org/jira/browse/COMPRESS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841896#action_12841896 ]

Stefan Bodewig commented on COMPRESS-99:
----------------------------------------

That wouldn't really be too hard to do, just make the entries Map inside ZipFile a LinkedHashMap rather than a HashMap.  I'm just not sure whether my (and ZipFile's) understanding of "original order" is the same as yours.

In ZIPs you have a central directory at the end of the archive and I'd consider the order of entries in this central directory the order of entries inside the archive.  This doesn't necessarily agree with the physical order of entry data inside the archive.

> Return zip entries in the original order
> ----------------------------------------
>
>                 Key: COMPRESS-99
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-99
>             Project: Commons Compress
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Trejkaz
>
> We would like ZipFile.getEntries() to return its entries in the original order, instead of the random ordering used at present.
> If this cannot be done, we need a way to sort the entries back into the original order ourselves (which at present is not possible either.)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (COMPRESS-99) Return zip entries in the original order

Richard (Jira)
In reply to this post by Richard (Jira)

    [ https://issues.apache.org/jira/browse/COMPRESS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842091#action_12842091 ]

Trejkaz commented on COMPRESS-99:
---------------------------------

That's a good point.  I think the order Sun's returns them in is the central directory order, so that would probably be enough.  If I wanted to order them into the order they're stored, in theory zip entries should already have offset information in order to do that.


> Return zip entries in the original order
> ----------------------------------------
>
>                 Key: COMPRESS-99
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-99
>             Project: Commons Compress
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Trejkaz
>
> We would like ZipFile.getEntries() to return its entries in the original order, instead of the random ordering used at present.
> If this cannot be done, we need a way to sort the entries back into the original order ourselves (which at present is not possible either.)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (COMPRESS-99) Return zip entries in the original order

Richard (Jira)
In reply to this post by Richard (Jira)

     [ https://issues.apache.org/jira/browse/COMPRESS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Bodewig resolved COMPRESS-99.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1

fixed wth svn revision 920286

getEntries returns entries in central directory order and a new getEntriesInPhysicalOrder uses the order the enries' data appears inside the archive.


> Return zip entries in the original order
> ----------------------------------------
>
>                 Key: COMPRESS-99
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-99
>             Project: Commons Compress
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Trejkaz
>             Fix For: 1.1
>
>
> We would like ZipFile.getEntries() to return its entries in the original order, instead of the random ordering used at present.
> If this cannot be done, we need a way to sort the entries back into the original order ourselves (which at present is not possible either.)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.