aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes ZipOutputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "ZipOutputStream" Watch "ZipOutputStream" New topic
Author

ZipOutputStream

Craig Parsons
Ranch Hand

Joined: Jan 28, 2004
Posts: 40
I am running a simple compression program I found on the web. I'm trying to get a better idea of how it works. It runs OK but the final Zip file isn't compressed. I am compressing 2 pictures which are about 1.6 MB total but the final zip file is also 1.6 MB. Attached is my source.
Any suggestions?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

JPG's are already compressed, so it's unlikely they will be compressed further (otherwise, what's to stop you from compressing and re-compressing until you have 1 bit?). Try it with text files. They compress dramatically.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Craig Parsons
Ranch Hand

Joined: Jan 28, 2004
Posts: 40
That was it.
Thanks.
 
Consider Paul's rocket mass heater.
 
subject: ZipOutputStream