Skip to content
Advertisement

convert zip byte[] to unzip byte[]

I have byte[] of zip file. I have to unzip it without creating new file, and get byte[] of that unzip file. Please help me to do that

Advertisement

Answer

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

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

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement