Reputation: 4806
I know that this question has been asked many times, but I still can't get my problem solved.
I am trying to compress 3 jpegs(about 500~700kb each) and a audio file(pcm 1.5mb).
I've tried Java.util.zip, zip4j and I get like 2% compression even in the maximum compression setting. I will need at lease 30~40% compression.
Is this a impossible thing to do?
The reason I am trying to compress data is my server's throughput is limited and I would like to get maximum speed. It takes about 6~8 seconds for 3.5mb zip... My goal is to get about 1~2second.
Upvotes: 0
Views: 506
Reputation: 718678
Is this a impossible thing to do?
It is generally impossible to get significant additional saving by compressing an already compressed file.
In simple terms, lossless compression works by getting rid of redundancy in the original file. Once you have compressed the file, a second round of compression will have little (if any) redundancy to remove. In the case of JPEG, the file format is already highly compressed, so a further round of lossless compression helps very little.
The only way you are going to get significant size reduction is by re-encoding the original image and audio files with a lower image / audio quality.
Upvotes: 2