File compression library for Java

I am building a Http server.

My server’s primary task is to respond a request(most times texts, sometimes images) with about 50 thumbnails(10kb each, jpeg), and some String(about 150 characters).

To reduce latency I am thinking of compressing the thumbnail and the text together as a file.

Could you recommend me a good compression library for Java that excels in compressing both text and image that does not exceed 1mb in total?(I guess size if my primary concern because of my server’s low bandwidth. But it has a very good hardware, so compression speed is secondary)


zip4j has been the best compression library , A java open-source library to handle Zip files. even no need to handle streams.

Leave a Reply

Your email address will not be published. Required fields are marked *