nandaka
nandaka

Reputation: 101

Content-Length value for compressed response

If I send a request to http server with header containing:

Accept-Encoding: gzip, deflate;

and the response has

Content-Encoding: gzip;
Content-Length:fsize; 

Is the fsize is the compressed value or uncompressed one?

If it is compressed, is it possible to get the actual/uncompressed size?

Upvotes: 2

Views: 946

Answers (1)

keltar
keltar

Reputation: 18399

Content-Length describes size of transmitted block; if compression enabled, it would be compressed size.

Like with any other lossless compression format - to get uncompressed size, you need to inflate (decompress) received data.

Upvotes: 6

Related Questions