Convert zip byte [] to decompress byte []

I have a byte[] zip file. I have to unzip it without creating a new file and get byte[] this unzipped file. Please help me do this.

+4
source share
1 answer

You can use ZipInputStream and ZipOutputStream (in the java.util.zip package) to read and write from ZIP files.

If you have data in a byte array, you can let it read from ByteArrayInputStream or write to ByteArrayOutputStream pointing to your input and output byte arrays.

+7
source

Source: https://habr.com/ru/post/1395577/


All Articles