Skip to content

How to get compressed size through writer? #942

Answered by klauspost
slhmy asked this question in Q&A
Discussion options

You must be logged in to vote

@slhmy The gzip size is 32 bits, so it wraps at 4GB. Also you can append separate gzip files in which case you need to read each (and you can really find each without decoding)- so in practical terms it is not that useful.

It is the final 4 bytes of the gzip stored in little endian.

gzhttp removes Content-Size instead, since it will do streaming writes.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@klauspost
Comment options

@slhmy
Comment options

Answer selected by slhmy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants