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

Will Pugh updated SANDBOX-183:
------------------------------


I fixed the style concerns, but did not fix the allocation size issue yet.  
Should not be hard to do, and it should be done.

I'm not sure how you plan to modify a zip file, whether you do it the "temp 
file" way or the "change in place" way, where a process crash would not create 
a corrupted version of the file.

Traditionally, you would do this by creating a temporary zip file, and doing a 
"mv" on it, so the name changed to the new name, but no data needed to be 
moved.  I'm not sure you can do this in Java, unless you had planned on 
shelling out the OS (and detecting different OSes to do this).

There were two main reasons I wanted to do this in memory:

  1)  So you would not need any type of temp directory
  2)  The performance differences can be VAST in some cases.  Imagine dealing 
with large XML or text files, or anything where the compression is significant. 
 If you do the temp file approach, you need to uncompress everything, and write 
it to a file.  Then, re-open all those files and re-compress them.  This is not 
only a lot more CPU time in compressing and uncompressing, but also a lot more 
data-movement using the disk drive.


> Compress should allow for writing to Zip Files
> ----------------------------------------------
>
>                 Key: SANDBOX-183
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-183
>             Project: Commons Sandbox
>          Issue Type: New Feature
>          Components: Compress
>    Affects Versions: Nightly Builds
>            Reporter: Will Pugh
>         Attachments: myzip.zip, myzip2.zip
>
>
> Compress should be able to modify existing ZipFiles.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to