Zip file manipulation

Discussion in 'Java' started by Roedy Green, Aug 17, 2003.

  1. Roedy Green

    Roedy Green Guest

    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.
     
    Roedy Green, Aug 17, 2003
    #1
    1. Advertising

  2. 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
     
    Marco Schmidt, Aug 17, 2003
    #2
    1. Advertising

  3. Roedy Green

    Roedy Green Guest

    On Sun, 17 Aug 2003 06:31:15 +0200, Marco Schmidt
    <> 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.
     
    Roedy Green, Aug 17, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,739
  2. HARI OM
    Replies:
    0
    Views:
    17,432
    HARI OM
    May 3, 2005
  3. abcd
    Replies:
    7
    Views:
    515
    Edward Elliott
    May 1, 2006
  4. majj81
    Replies:
    0
    Views:
    337
    majj81
    May 31, 2006
  5. Chris Lambacher

    Re: Add file to zip, or replace file in zip

    Chris Lambacher, Jun 1, 2006, in forum: Python
    Replies:
    0
    Views:
    610
    Chris Lambacher
    Jun 1, 2006
Loading...

Share This Page