Droidme
Droidme

Reputation: 1252

Java attain >50% compression ratio

I am trying to compress the pdf files(sometimes images). I need a compressor in java which will help me compress my files. I need the size to be less than half the size of the original document. I tried deflator given in java apis. But it was not very successful. Please help me on this.

Upvotes: 0

Views: 880

Answers (2)

sundar
sundar

Reputation: 1760

I am sure you would have already explored open source solution but LZMA is one of the best in compressing the files to a greater extent. Try the Java library for 7zip in the below link.
http://www.7-zip.org/sdk.html

Upvotes: 1

Peter Lawrey
Peter Lawrey

Reputation: 533432

You need to compress the images individually more than they are already (which can reduce quality) Trying to compress images with a general lossless compression program won't be very successful as the data is compressed already.

Upvotes: 5

Related Questions