Unzipping a file from InputStream and returning another InputStream

后端 未结 4 731
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 06:33

I am trying to write a function which will accept an InputStream with zipped file data and would return another InputStream with unzipped data.

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 07:08

    If you can change the input data I would suggested you to use GZIPInputStream.

    GZipInputStream is different from ZipInputStream since you only have one data inside it. So the whole input stream represents the whole file. In ZipInputStream the whole stream contains also the structure of the file(s) inside it, which can be many.

提交回复
热议问题