ZipOutputStream

I am using ZipoutputStream with CheckedOutputStream to zip a folder containing jpg file the problem is that when we r going to unzip this folder using Winzip the image totally get collapse that is there is a complete disordser of pixels and image look like an example of abstract art Is any body help me.

You question is kind of like "My car doesn't work. What's the problem?"
You'll need to supply more info... we cannot help you otherwise. Please post some code from your application.
/Michael

Similar Messages

  • Help:  unable to open files created with ZipOutputStream

    I am seeing some weird behavior with ZipOutputStream, using JDK 1.3.1_01 on Win2K. The code that follows is a snippet from a servlet that delivers a ZIP archive of a set an entire directory tree. I was preparing to roll it into production, but one of my testers noticed a bug that I didn't see.
    It seems that her version of WinZip (6.x) was unable to properly extract the files from the archive while mine (8.0) had no problems. I then tried a couple of other programs, and I've been able to reproduce the behavior with the built-in viewer in Lotus Notes 5 (the only other utility I had handy).
    I've made sure to call closeEntry() on each ZipEntry, and to call finish() before close() on the ZipOutputStream itself. Has anyone seen this behavior besides me?
    Thanks and regards,
    Casey
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
        response.setContentType("application/zip");
        response.setHeader("Content-Disposition","attachment; filename=\"package.zip\"");
        File dir = new File(m_templateDir);
        ZipOutputStream out = new ZipOutputStream(response.getOutputStream());
        addFilesToPackage(dir, "", out);
        out.finish();
        out.close();
    // Recursively walks the directory, adds files to the output stream,
    // and calls itself to handle sub-directories
    private void addFilesToPackage(File dir, String pathPrefix, ZipOutputStream out)
    throws IOException {
        File[] list = dir.listFiles();
        for (int k=0; k<list.length; k++) {
            File f = list[k];
            if (f.isDirectory()) {
                addFilesToPackage(f, pathPrefix + f.getName() + "/", out);
            } else {
                ZipEntry ze = new ZipEntry(pathPrefix + f.getName());
                out.putNextEntry(ze);
                InputStream in new FileInputStream(f);
                byte[] buff = new byte[2056];
                int bytesRead = 0;
                while((bytesRead = in.read(buff)) > -1) {
                    out.write(buff, 0, bytesRead);
                out.closeEntry();
                in.close();
    }

    I had also a problem with W2K when using ZipInputStream, I could not to solve it.
    so I used Unpacked Streams.
    weird indeed.
    Sometimes it works just fine.
    FileInputStream fis;
    byte [] in;
    //ZipFile zf = new ZipFile(new File("data/products.zip"));
    //ZipEntry ze = zf.getEntry("products.wsl");
    //fis =new BufferedInputStream( zf.getInputStrea(ze));
    fis = new FileInputStream("data/products.wsl");
    koko = fis.available();
    in = new byte[koko];
    fis.read(in);
    fis.close();
    I think code was something like abowe (there has been a while...)

  • Add arabic file names to ZipOutputStream problem

    Dear All,
    i have problem with add arabic file names to ZipOutputStream problem my sample code :
    zipOutputStream.putNextEntry("&#1593;&#1585;&#1576;&#1610;.txt");//some arabic text
    the zip file created successfully and contain files but the files in the zip file with name '??????????.txt'.i use many character set to encode arabic file name such as utf-8,windows-1256,iso-8859-1,IBM437 but the name changed to someting cannot understand lik '_&#1583;_&#1587;_&#1584;_&#1583;_&#1586; ___«___è_&#1585;1.txt' or '??????????.txt'.
    is there anyone to help
    with regards
    Wa'el Abu Rahmeh

    Its a warning. You can ignore it, and your program will run correctly.
    To get the full details, follow the instructions and run it with Xlint:
    javac -Xlint:unchecked beans\CustomerManager.javaProduces this error message:
    beans\CustomerManager.java:19: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
                rv.add(getCustomer(String.valueOf(i)));
                      ^
    1 warningIt is a Java1.5 specific warning because you are not using the new Generics info with the collections.
    Here is the version that compiles with no warnings whatsoever.
    package beans;
    import java.util.ArrayList;
    import java.util.List;
    public class CustomerManager
        public List<Customer> getCustomers()
            return generateCustomers();
        private List<Customer> generateCustomers()
            List<Customer> rv = new ArrayList<Customer>();
            for (int i = 0; i < 10; i++)
                rv.add(getCustomer(String.valueOf(i)));
            return rv;
        public Customer getCustomer(String id)
            return new Customer(id, id + "First", "Last" + id,
                "123 Caroline Road Fooville");
    }Basically the change was everywhere you have List or ArrayList replace it with List<Customer> - meaning you have a List of customer objects, rather than just a List of "anything"
    If you are compiling with jdk1.5, then anywhere you use a Collection without specifying the types in this manner, it will create a warning.
    You can ignore the warning if you so wish, and the program should run fine.
    Cheers,
    evnafets

  • HELP -ZipOutputStream performance is not consistent across servers

    Hi,
    I have a pretty standard code that zips one folder in a zip file using ZipOutputStream. The folders that are zipped are 2 GB in size and consists of TIFF images files.
    We are currentinly in the testing phase and notice very inconsistent performance issues with the Zipping module. On the integration server, to zip 2 GB of data, the zip module took 5 minutes. However, when the same zip code runs on the staging server, it takes 20 minutes. Both the servers are the same in RAM capacity and processing powers. The size of the data is also the same: 20 GB.
    Can anyone help me understand what could be the issue such taht the performance is so detrimental when movingfrom one server to another.
    The only difference between the two servers is that on the integratoin server there is 20 GB of free harddisk space and on the staging server there is only 8 GB of hard disk space. Is it possible that because of the less disk space on staging, the OS itself is taking a few seconds extra on each write to allocate the space. Possibly disk fragmentation also may be a factor.
    For your reference, the zip code is as follows:
    public boolean createZip(File sourceToZip,String zipDestination, String zipFileName) throws IOException
               boolean result=false;
               try{
         // Check that the directory is a directory, and get its contents
         File d = sourceToZip;
         if (!d.isDirectory())
          throw new IllegalArgumentException("Not a directory:  "
              + sourceToZip);
         String[] entries = d.list();
         byte[] buffer = new byte[4096]; // Create a buffer for copying
         int bytesRead;
         ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipDestination+"/"+zipFileName));
         for (int i = 0; i < entries.length; i++) {
          File file = new File(d, entries);
         if (file.isDirectory())
         continue;//Ignore directory
         FileInputStream in = new FileInputStream(file); // Stream to read file
         ZipEntry entry = new ZipEntry(file.getName()); // Make a ZipEntry
         out.putNextEntry(entry); // Store entry
         while ((bytesRead = in.read(buffer)) != -1)
         out.write(buffer, 0, bytesRead);
         in.close();
         out.close();
         result=true;
              catch(IOException e)
                   throw e;
              return result;
         }If anyone has any ideas let me know Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The free space could be an issue, but you can improve your code:
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipDestination+"/"+zipFileName));
    ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipDestination+"/"+zipFileName)));That will improve your performance considerably on all platforms. Also change your buffer of 4096 to 16k or 32k.
    You could also consider converting the TIFF files to JPEG instead of zipping them at all.

  • ZipOutputStream problem

    hi, im creating zip file which contains two files. The problem is that it will create path folder in the zip where my file is located if im zipping more than one file.
    I will give example to make it clear. When my file is located in C:\User\Admin\Desktop\test\file.txt. The zip will contain user folder, admin folder, desktop folder, test folder and then file.txt. which is supposed to be file.txt only. The code works fine if im zipping only one file but when two files this problem will occur.
    try {
    String [] inFilename = {"C:\\Users\\Desktop\\test\\oral-care-jul.28.2009.0937am.txt","C:\\Users\\Nelson\\Desktop\\RemoveBadWords test\\oral-care-jul.28.2009.0937am.csv"};
    String outFilename = "C:\\Users\\Desktop\\test\\outfile3.zip";
                             ZipOutputStream out = new ZipOutputStream( new FileOutputStream(outFilename));
                             for (int i=0; i<inFilename.length; i++) {
                                  // Add ZIP entry to output stream.
                                  out.putNextEntry(new ZipEntry(inFilename));
                             FileInputStream in = new FileInputStream(inFilename[i]);
                             byte[] buf = new byte[1024];
                             int len;
                             while ((len = in.read(buf)) > 0) {
                             out.write(buf, 0, len);          
                                  in.close();
                                  out.closeEntry();     
                             out.close();
    } catch (IOException e) {
    System.out.println(e);
    }Please help, how can i get rid of the folder. Thank in advanced.
    Edited by: shendel on Jul 28, 2009 11:19 PM
    Edited by: shendel on Jul 28, 2009 11:25 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Im little confused, although i think i got what you mean. The full path in out.putNextEntry method is the responsible for the creation of unwanted folder.
    For the sake of other below is the working code:
                         try {
                             String [] inFilename = {"C:\\Users\\Desktop\\test\\oral-care-jul.28.2009.0937am.txt","C:\\Users\\Desktop\\RemoveBadWords test\\oral-care-jul.28.2009.0937am.csv"};
                             String outFilename = "C:\\Users\\Desktop\\test\\outfile6.zip";
                           String [] files = {"oral-care-jul.28.2009.0937am.txt","oral-care-jul.28.2009.0937am.csv"};
                             ZipOutputStream out = new ZipOutputStream(
                               new FileOutputStream(outFilename));
                             for (int i=0; i<inFilename.length; i++) {
                                  // Add ZIP entry to output stream.
                                  out.putNextEntry(new ZipEntry(files));
                             FileInputStream in = new FileInputStream(inFilename[i]);
                             byte[] buf = new byte[1024];
                             int len;
                             while ((len = in.read(buf)) > 0) {
                             out.write(buf, 0, len);          
                                  in.close();
                                       out.close();
                        } catch (IOException e) {
                        System.out.println(e);
                        }Thanks for sharing your thought ejp. I really appreciate it. :) cheers..
    Edited by: shendel on Jul 29, 2009 1:14 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • File created from ZipOutputStream not opening as Windows Compressed Folder

    I create a file using java.util.ZipOutputStream using JDK 5. I can open the file in WinZip. But when I try to open as "Compress (zipped) Folders" in Windows XP, I just get an empty folder. Is there something I have to do other than creating a ZipEntry for each file? From WinZip, I can look at the files and extract them and everything seems to be fine including the folder structure.
    Thanks.

    Make sure there are no invalid characters in folders or files stored in the zip file.
    Windows does not allow the following characters in folder and file names.
    \ / : * ? " < >
    Check your zip folder structure to see if it contains any of these characters.

  • Layered IO Streams (ZipOutputStream)

    Hi all,
    I've been trying to get some layered streaming going.
    Zip File (created on the fly) + Other Files -> Jar archive
    Getting everything into a jar archive is ok, but I'd like to be able to create the zip file on the fly without having to make a temporary file elsewhere. But I run into problems signing off the streams. If I set some streams up simply as follows:
    ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream( new
    FileOutputStream(new File("out/output.jar"))));
    zos.putNextEntry(new ZipEntry("demo1.zip"));
    ZipOutputStream zps = new ZipOutputStream(zos);
    zps.putNextEntry(new ZipEntry("readme1.txt"));
    zps.flush();
    zps.closeEntry();
    zps.close();
    zos.closeEntry();
    zos.putNextEntry(new ZipEntry("demo2.zip"));
    zos.close();
    This snippet doesn't actually read or write anything, but still triggers the error. I get a stream closed error when it hits zos.closeEntry(). I'm guessing this is because zps.close() closes down everything, including its underlying streams.
    Problems is though, if I dont use zps.close() it doesn't sign off the zip file correctly. I end up with an End-of-central-signature directory not found error when I try to open the zip file that has been created.
    Got pretty stumped on this. Anyone tried layering ZipOutputStreams like this successfully?
    Cheers.

    oh damn I feel like a buffoon! Spent hours looking at that and I don't know how many times I looked up the ZipOutputStream in the javadocs and didn't see the finish method.
    Thanks for the reply.
    DJ.

  • Read zip files created by ZipOutputStream

    Hello :)
    I am wondering if it is possible to create a zipfile using ZipOutputStream, which can be read using ZipInputStream with out using the ZipFile work-around discussed in http://forum.java.sun.com/thread.jspa?forumID=256&threadID=492219. This is no option for me, because we have a lot of client applications deployed, which cannot easily be altered.
    Are there any (third-party) libraries which I can use?
    -M1chael

    try it
    // These are the files to include in the ZIP file
    String[] source = new String[]{"source1", "source2"};
    // Create a buffer for reading the files
    byte[] buf = new byte[1024];
    try {
    // Create the ZIP file
    String target = "target.zip";
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(target));
    // Compress the files
    for (int i=0; i<source.length; i++) {
    FileInputStream in = new FileInputStream(source);
    // Add ZIP entry to output stream.
    out.putNextEntry(new ZipEntry(source[i]));
    // Transfer bytes from the file to the ZIP file
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    // Complete the entry
    out.closeEntry();
    in.close();
    // Complete the ZIP file
    out.close();
    } catch (IOException e) {

  • How to zip a LARGE file using zipOutputStream

    Hi,
    I am trying to zip a file which is over 50MB, and I got an "Out-of-Memory" error.
    Here is part of the java program:
    public static String Zipper(String Path,String ZipName,String FilestoZip, boolean DeleteFile){
    /* This function archives a given subdirectory and the deletes the
    archived files.
    Parameters: Path => Full path of the zipped file subdirectory
    Zipname => Name of the zip file to create
    FilestoZip => List of files to zip.
    Return: Message status if completed or not
    try{
    Msg = "COMPLETE:Creating zip file "+ZipName;
    ZipOutputStream zip = new ZipOutputStream( new FileOutputStream(ZipName));
    zip.setMethod(ZipOutputStream.DEFLATED);
    zip.setLevel(Deflater.BEST_COMPRESSION);
    File file= new File(FilestoZip);
    FileInputStream in = new FileInputStream(file);
    byte[] bytes = new byte[in.available()];
    in.read(bytes);
    in.close();
    ZipEntry entry = new ZipEntry(file.getName());
    entry.setTime(file.lastModified());
    zip.putNextEntry(entry);
    zip.write(bytes);
    zip.closeEntry();
    zip.close();
    catch (Exception e) {Msg = e.getLocalizedMessage();}
    This program works fine with small files, but when the file size gets bigger, it will create "out-of-memory" error.
    Does anybody know how to work around this?
    I appreciate your help.
    Michelle

    I modified the program as follow:
    ZipEntry entry = new ZipEntry(file.getName());
    entry.setTime(file.lastModified());
    zip.putNextEntry(entry);
    byte[] bytes=new byte[1024];
    int len;
    while ((len=in.read(bytes))>0) {
    zip.write(bytes,0,len);
    And now it is working. I can zip a file with 125MB size.
    Thank you for your help.
    Michelle

  • ZipOutputStream appends characters to beginning of zipped file?

    Hi and thanks in advance for any help!
    I am trying to zip Excel files using ZipOutputStream class. I can open the Excel files fine before I zip. Then I run my program to zip. It seems to work. I use WinZip to unzip and when I try and open unzipped file in Excel, Excel says it does not recognize format. Looking at unzipped file in text editor, about 15 wierd characters and nulls are now appended to the beginning of my Excel file that are not in the original. If I delete them in the text editor, Excel can open.
    Here is my zip code:
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ZipOutputStream zos = new ZipOutputStream(baos);
    ArrayList fileNames = new ArrayList();
    fileNames.add ("91PSAG0Jak.csv");
    fileNames.add ("91I9F60K62.csv");
    // Compress the files
    for (int i=0; i<2; i++) {
    String filename = String.valueOf(fileNames.get(i));
    byte[] file = DatabaseUtilities.downloadFile("pdfstoragedir", filename);
    // Add ZIP entry to output stream.
    zos.putNextEntry(new ZipEntry(filename));
    ObjectOutputStream oos = new ObjectOutputStream (zos);
    oos.writeObject(file);
    oos.flush();
    // Complete the entry
    zos.closeEntry();
    //Complete the ZIP file
    zos.close();
    byte[] zipFile = baos.toByteArray();
    DatabaseUtilities.uploadFile("pdfstoragedir", "zipOutput.zip", zipFile);
    FileOutputStream fos = new FileOutputStream("C:\\zipOutput.zip");
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    bos.write(zipFile, 0, zipFile.length);

    Thanks, I got it I think, I can write my byte[] directly to the zipOutputStream:
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ZipOutputStream zos = new ZipOutputStream(baos);
    ArrayList fileNames = new ArrayList();
    fileNames.add ("8aCeOH0Fba.zip");
    fileNames.add ("8da6S40H4e.zip");
    // Compress the files
    for (int i=0; i<2; i++) {
    String filename = String.valueOf(fileNames.get(i));
    byte[] file = DatabaseUtilities.downloadFile("pdfstoragedir", filename);
    // Add ZIP entry to output stream.
    zos.putNextEntry(new ZipEntry(filename));
    zos.write(file);
    // Complete the entry
    zos.closeEntry();
    //Complete the ZIP file
    zos.close();
    byte[] zipFile = baos.toByteArray();
    DatabaseUtilities.uploadFile("pdfstoragedir", "zipOutput.zip", zipFile);
    FileOutputStream fos = new FileOutputStream("C:\\zipOutput.zip");
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    bos.write(zipFile, 0, zipFile.length);

  • Read chunks from ZipOutputStream

    How can I read chuncks of data from ZipOutputStream object?
    Here is my code:
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename))
    String name="XXX";
    ZipEntry templateDir = new ZipEntry(name + "/");
    ZipEntry templatesFile = new ZipEntry(name +"/" + name + ".xml");
    zip.putNextEntry(templateDir);
    zip.putNextEntry(templatesFile);
    XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
    outputter.output(doc, zip);
    zip.closeEntry();
    I need to create a zip file by chunks but by using the JDOM, the output method put the entire document to be a zip.
    How can I create chunks of it?
    Is the only way is to create it as is and then read the zip as chunks?
    Please supply examples.
    Thanks in advanced...

    Hi chelseasadhu,
    To achieve your requirement, there are two methods: use Lookup Transformation or Merge Join Transformation. For more details, please see:
    Method1: Lookup Transformation
    Drag a Data Flow Task to Control Flow Task.
    Create an OLE DB Connection Manager that connects to the corresponding server database.
    Create two Excel Connection Managers that connects to the corresponding excel files.
    Drag an Excel Source that connects to the source Excel Connection Manager.
    Drag Lookup Transformation that connects to the OLE DB Connection Manager, then select emp table from the drop-down list.
    Map empid from Lookup Columns to Input Columns, and select all columns from Lookup Columns pane.
    Connect the Lookup Transformation to target Excel Destination.
    Method2: Merge join Transformation
    Drag a Data Flow Task to Control Flow Task.
    Create an OLE DB Connection Manager that connects to the corresponding server database.
    Create two Excel Connection Managers that connects to the corresponding excel files.
    Drag an Excel Source that connects to the source Excel Connection Manager.
    In the Advanced Editor for OLE DB Source dialog box, change the IsSorted property of OLE DB Source Output to True, then change the SortKeyPosition property of empid output column to 1.
    In the Advanced Editor for Excel Source dialog box, change the IsSorted property of Excel Source Output to True, then change the SortKeyPosition property of empid output column to 1.
    Drag Merge join Transformation connect to those two source, then select Inner join as Join type.
    Select all columns from OLE DB Source pane.
    Connect the Merge Join Transformation to target Excel Destination.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • ZipOutputStream or ObjectOutputStream?

    Dear all expert,
    Hello! I just wonder if ObjectOutputStream is the same as zipOutputStream? (just without the zip function) And can I use zipOutputStream in the FTP java program? Will it actually help to improve the transmission speed(smaller file size)? Thanks for your help.

    radeon wrote:
    And can I use zipOutputStream in the FTP java program? Will it actually help to improve the transmission speed(smaller file size)? Thanks for your help.Well, yes, you can use ZipOutputStream when you're sending a file via FTP. It will produce a smaller transmission. But as a side effect, the resulting file on the FTP server will be compressed. This may be a harmful side effect.

  • ObjectOutputStream?zipOutputStream?

    Dear all expert,
    Hello! I just wonder if ObjectOutputStream is the same as zipOutputStream? (just without the zip function) And can I use zipOutputStream in the FTP java program? Will it actually help to improve the transmission speed(smaller file size)? Thanks for your help.

    radeon wrote:
    Dear all expert,
    Hello! I just wonder if ObjectOutputStream is the same as zipOutputStream? (just without the zip function) It is not. Zip streams and object streams are very different
    And can I use zipOutputStream in the FTP java program? Will it actually help to improve the transmission speed(smaller file size)? Thanks for your help.What FTP program? But yes, having a smaller file should reduce your total transmission time. Of course, you will have to unzip at the other side
    You may also want to look at the GZip streams. I found these much more useful than the Zip streams

  • What is the maximum  files ZipOutputStream can handle ?

    Hi all,
    Can ZipOutputStream support the zipping of a folder which contain large amount of files eg around 10 GB of data ? If so, what is the heap size require to open such a huge zip file ?
    Is it better I break the total amount of files into small portion, and zip the small portions ?
    Thanks

    Why don't you try it?

  • ZipOutputStream triggers OutOfMemoryError on large files

    I am trying to zip a directory structure that is large, e.g., /usr. I traverse the directory structure and zip as I go. As long as the directory structure totals about 1 Gig or less there is no problem, otherwise ZipOutputStream craps out. There doesn't seem to be a way to alter existing zip files and insert new entries once you have closed the stream. Is there some way to create a zip file that can approach sizes in the 1000's GIG range? Is ZipOutputStream limited to certain sizes? Are Zip files limited? How can I create a single file that contains a giant directory structure that can then be used to reconstruct the tree later on?

    A brilliant programmer named Phil Katz came up with ZIP compression when the popular compression program was hijacked by an algorithm's corporate "owner" that had the brilliant idea that if it made a penny every time its program was run it would make millions. What happened was PKZip (yes, those are the authors initials) which immediately replaced the proprietary solution. The "owner" never recouped its legal costs, if you enjoy irony.
    Java's zip compression is licensed from Phil Katz's PKWare company. Most of the shareware and freeware zip programs are also built on software licensed from PKWare. So you should probably hike over to www.PKWare.com and see what they have for you. If you need to do this from java, fake it by simply running an existing compression program out of java.
    If that won't work for you, here's another place to start. The Zip format is basically a serial format and is not suitable for random-access use. Zip a directory? OK. Insert and delete individual files from a large Zip? Not OK. So the solution is to redesign for random-access use and then use the compression as part of your solution. Any contemporary OS design solves this problem in its disk I/O mechanism.
    Question about your design: do you really want a single file that size?
    By the way, congratulations on figuring out the basics of java.util.zip. Several people, myself included, have reported the entire API doc as a bug. It's close to incomprehensible.

Maybe you are looking for

  • Unable to load a DLL

    Hi, I have written a java application using JNI which sucessfully access the cryptoAPI functions. I am trying to convert it into an applet. I get the following error when i open it in IE. before java.lang.UnsatisfiedLinkError: no Msgimpl in java.libr

  • Windows 7 64bit & Boot Camp 3.0 Installer Error

    I have an early 2009 13" unibody MacBook. I have run the 64bit Win7 RC on it, and installing the 3.0 version of Bootcamp (as I recall) went well. I have the released version of Windows 7 and am trying to install the 64bit version on a 62GB Bootcamp p

  • Adobe Reader not working on my Mac with Yosemite upgrade

    Hello, since upgrading my Mac to Yosemite, I haven't been able to open Adobe Reader or any documents in Adobe Reader. I can't even upgrade Adobe reader as a message says it is not a supported file type or it has been damaged. Tried in different brows

  • "Combine supported filed in Acrobat" doesn't work for Office docs

    Windows 7 x64, Acrobat 9 Pro, Office 2010. I used to be able to select the context menu action "Combine supported files in Acrobat..." on multiple Office files, and it worked fine. But I recently had this computer reimaged, and now what happens is th

  • Known issues, ALREADY?

    Discoloration in one of the corners Source, MR Reception issues, again Source, MR Advice?  Pick up the insurance you may be glad you did.  Note, if I am not allowed to post outside links please let me know, I read the forum guidelines and did not see