Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Zip file manipulation

Reply
Thread Tools

Zip file manipulation

 
 
Roedy Green
Guest
Posts: n/a
 
      08-17-2003
I am about to embark on a job that requires intensive zip file
manipulation. I get the feeling that Java's classes are pretty light
weight.

Ideally I would like to be able to bulk delete members efficiently,
and merge two existing zip files efficiently without decompressing and
recompressing the members.

I know this in theory should be possible, but I wondered if there are
ways to do it in Java without a lot of bit level coding. If you are
curious as to why I am doing this see
http://mindprod.com/zips/java/replicator.html


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
Marco Schmidt
Guest
Posts: n/a
 
      08-17-2003
Roedy Green:

>I am about to embark on a job that requires intensive zip file
>manipulation. I get the feeling that Java's classes are pretty light
>weight.


Yes, indeed. I find that alright, because most people don't need more
than extracting some or all files or creating a completely new
archive. What I dislike is the fact that it's almost impossible to
extend the API without rewriting a lot of things from scratch.

>Ideally I would like to be able to bulk delete members efficiently,
>and merge two existing zip files efficiently without decompressing and
>recompressing the members.
>
>I know this in theory should be possible, but I wondered if there are
>ways to do it in Java without a lot of bit level coding.


Not sure what you mean by "bit level coding", but you'll probably have
to do the complete generation of the central directory at the end of
the file yourself. You must adjust the offsets there.

You will probably also have to parse and copy the local headers
yourself, because the ZIP API just lets you read them.

>If you are
>curious as to why I am doing this see
>http://mindprod.com/zips/java/replicator.html


Isn't that what rsync <http://samba.anu.edu.au/rsync/> is for?
Synchronization of files on remote servers using compression. Which
has the benefit of smart detection of parts that have changed,
transfering only the changes. Plus, it can compare without actually
having both versions of a file at the same place (which would require
a lot of transfers), it uses rolling checksums
<http://samba.anu.edu.au/rsync/tech_report/> instead.

Regards,
Marco
--
Please reply in the newsgroup, not by email!
Java programming tips: http://jiu.sourceforge.net/javatips.html
Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      08-17-2003
On Sun, 17 Aug 2003 06:31:15 +0200, Marco Schmidt
<(E-Mail Removed)> wrote or quoted :

>Isn't that what rsync <http://samba.anu.edu.au/rsync/> is for?
>Synchronization of files on remote servers using compress


Yes. The catch is you have to persuade your ISP to run RSYNC. The
Replicator scheme works with an ordinary HTTP server and no other
software on the ISP.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possibility to add a zip-file to a new zip-file with "add to zip" (right-click) ?? erikkie@casema.nl Computer Support 4 06-26-2006 12:18 AM
Re: Add file to zip, or replace file in zip Chris Lambacher Python 0 06-01-2006 09:39 PM
Add file to zip, or replace file in zip majj81 Python 0 05-31-2006 07:10 AM
Add file to zip, or replace file in zip abcd Python 7 05-01-2006 10:19 PM
java.util.zip.ZipException: error in opening zip file hari_om@hotmail.com Java 0 05-03-2005 04:47 PM



Advertisments