Gets the uncompressed size of this GZIPInputStream?

后端 未结 8 749
余生分开走
余生分开走 2021-01-04 13:51

I have a GZIPInputStream that I constructed from another ByteArrayInputStream. I want to know the original (uncompressed) length for the gzip data.

8条回答
  •  暖寄归人
    2021-01-04 14:40

    No, unfortunately if you wanted to get the uncompressed size, you would have to read the entire stream and increment a counter like you mention in your question. Why do you need to know the size? Could an estimation of the size work for your purposes?

提交回复
热议问题