Home > Mobile >  gzip-test returning GZIP is enabled but GZIP size is about 6 times the original
gzip-test returning GZIP is enabled but GZIP size is about 6 times the original

Time:12-09

Can someone please explain what does this image means?

It says original size is 10B, GZIP Size is 58B (Compression %: -480% is compressed).

Also, the HTTP status is 400 Bad Request

Thank you!

CodePudding user response:

Regarding compression: compressing tiny files like that is very inefficient with a general purposes compression algorithm. The compressing program will need to store some metadata, and it is likely metadata and compressed raw bytes will take more space than the original data.

The choice is:

  • Don't compress tiny files
  • "Join" many small files inside a folder using tar, then comress a single large tar file, so the outcome will be something like foo.tar.gz or foo.tar.[Insert your compressor here]
  • You could try sharing a dictionary for multiple files, for example using zstandard

Regarding 400 HTTP status - you've likely sent incorrect parameters to the API, hence server responded with: I don't understand your request and cannot process it

  • Related