-1

Is there any reliable way of getting the uncompressed length of a compressed string (specifically compressed with GZIP) without decompressing the string? I have no control over the compression process, i.e. no agreed upon flags or tail data. I've read you can check the four last bytes, but that seem to require flags to be enabled which, again, I have no control over.

gwow12345
  • 311
  • 3
  • 12

1 Answers1

0

The gzip stream itself does not contain the information you require. But if your stream includes a header, it might.

More info here.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189