You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Lee (Jira)" <ji...@apache.org> on 2021/04/16 09:05:00 UTC

[jira] [Comment Edited] (COMPRESS-574) Byte range support in archive creation

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

Peter Lee edited comment on COMPRESS-574 at 4/16/21, 9:04 AM:
--------------------------------------------------------------

Hi [~gaellalire]. Thank you for your contributing!

 

_When you have a ZIP which contains N components and you want to let the user choose which components it needs, you need to create 2^N - 1 ZIP._

_Also ZipOutputStream will never allow you to resume from a byte range, you need to generate all previous data._

 

I'm confused a little bit about the descriptions above. What's the problem you are trying to solve?


was (Author: peterlee):
Hi [~gaellalire]. Thank you for your contributing!

 

_When you have a ZIP which contains N components and you want to let the user choose which components it needs, you need to create 2^N - 1 ZIP._

_Also ZipOutputStream will never allow you to resume from a byte range, you need to generate all previous data._

 

 

I'm confused a little bit about the descriptions above. What's the problem you are trying to solve?

> Byte range support in archive creation
> --------------------------------------
>
>                 Key: COMPRESS-574
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-574
>             Project: Commons Compress
>          Issue Type: Improvement
>          Components: Archivers
>            Reporter: Gaël Lalire
>            Priority: Minor
>         Attachments: DynamicZip.java, DynamicZipTest.java
>
>
> When you have a ZIP which contains _N_ components and you want to let the user choose which components it needs, you need to create _2^N - 1_ ZIP.
> So the idea is to store each component once (or twice if you want both deflated and stored version), and create the ZIP on the fly.
> For the moment you can stream with a ZipOutputStream but if you need an InputStream things get a lot harder. I guess programs are writing the ZIP to a file system and read from it after, so not really a streaming anymore.
> Also ZipOutputStream will never allow you to resume from a byte range, you need to generate all previous data.
> So I made a class to do that, I think such functionality has its place in commons compress.
> You can see my code attached and adapt it for better integration / other archive type support or simply to get inspired.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)