mardi 17 mai 2016

gzip as nginx would in the JVM

I am trying to write a test to compare the size of files minified using different methods. However I need to compare the resulting files after gzipping them (since they are meant to be served by a server like nginx).

So for the compression step I used the Java GZipOutputStream. And I found out that the size of the Java GZip was different from the size produced by my cli gzip program:

 gzip -- compression/decompression tool using Lempel-Ziv coding (LZ77)

Then I found this article, so there are differences between different gzip implementations.

How could I produce the same results in terms of size as nginx server in Clojure/Java (nginx is the most likely target in my case) ?

Aucun commentaire:

Enregistrer un commentaire