Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

ZipOutputStream creates corrupted files when bigger than 4gb  RSS feed

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

i hope i've chose the right forum for this issue.

i am using the zipDeflater and zipOutputStream from the java util package to create zip files.

this works just fine as long as the created zip file does not exceed 4gb of space. if it does
i am not able to open the file using win rar to view its content because the file is corrupted.

the source code that generates the zip file is down below.


thanks for help and advice..



 
Bartender
Posts: 9509
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The original ZIP format had a number of limits (uncompressed size of a file, compressed size of a file and total size of the archive) at 4GB.


Zip File Format
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so what i want to do is shove it into a gzip stream ??
or are there any restrictions as well ?
 
Joe Ess
Bartender
Posts: 9509
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The package summary for java.util.zip says that the GZIP implementation is based on RFC 1952, which apparently supports files larger than 4Gb.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!