Name: boT120536 Date: 02/26/2001
Development, JDK: "java version JDK.1.6_Borland"
Runtime, JRE: 1.1.6_008 (downloaded from your site - SUN )
the problem exist on version 1.2 and 1.3 too.
The problems are:
- it is impossible to unzip a "zip" file that contains a file with a real
size over 2Gb
- it is impossible to continue with the next "zip" entry if there is a
problem with the current entry.
- note: I know that it is impossible to do a zip file over 4Gb (but it
is possible to compress more than 4Gb of data if the result zip file
has a size less than 4Gb...). It is the norm for eip... But I'm not
sure this norm says that it is impossible to compress a file between
2Gb and 4Gb...
The test is:
1) - 6Gb of free space on your disk is needed
- 3Gb of used space on your disk is needed
2) Do a big zip file "big.zip" with 3 files a.dat, b.dat and c.dat :
- a.dat and c.dat must have a small size (less than 1Mb; 1Kb is fine)
- b.dat must have a big size (between 2Gb and 4Gb; 2.5Gb is fine. Note:
1Gb = 1024Mb = 1,048,576Kb = 1073741824 bytes)
- the name of the 3 files are important (there must be a file before
and after the big file b.dat in the zip file).
- for zipping operation, I have download the last version of the
shareware tools "Winzip" (another zip tools can be used if it is
compatible with your zip package - I have not try to zip the 3
files with the zip package in "java.utils" - I'm not sure it would
work...). Also, I have used this tools to create the b.dat (all my disk
with no compression).
3) Unzip "big.zip" with the zip package in "java utils".
The results are :
- a.dat is correctly unzipped (if it is not a.dat then it is c.dat; it
depends on how the file are stored in the "zip" file; so, it depends
on the tools used for zipping)
- b.dat is not unzipped (a ZipException "invalid entry size" is thrown)
- c.dat can not be unzipped since there was a problem with the previous
entry b.dat (if it is not c.dat then it is a.dat; ...)
(Review ID: 116880)
Name: boT120536 Date: 04/22/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed mode)
I can't seem to write large zip files.
The code below _should_ generate a zip file
with 100,000 entries.
public class ZipTest
private ZipOutputStream zip;
public static void main (String args) throws Exception
ZipTest t = new ZipTest ();
public void doIt () throws Exception
zip = new ZipOutputStream (new FileOutputStream ("D:\\temp\\temp.zip"));
for (int i = 0; i < 100000; ++i)
byte data = new byte;
String entryName = "Fred" + i;
CRC32 crc32 = new CRC32();
crc32.update(data, 0, data.length);
ZipEntry zipentry = new ZipEntry (entryName);
zip.write (data, 0, data.length);
When I compile it, it runs to completion with no reported
errors. It generates a file that is _about_ the correct
size (106 MB). But, the file only reports 34464 entries
when opened. The last 63000+ entries are not accessible.
This is also a problem with JDK1.2.2
(Review ID: 121141)