Android InputStream Unzip decompress(InputStream is, OutputStream os)

Here you can find the source of decompress(InputStream is, OutputStream os)

Description

decompress

Declaration

public static void decompress(InputStream is, OutputStream os)
        throws Exception 

Method Source Code

//package com.java2s;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;

public class Main {
    static final int BUFFERSIZE = 1024;

    public static void decompress(InputStream is, OutputStream os)
            throws Exception {
        GZIPInputStream gin = new GZIPInputStream(is);
        int count;
        byte data[] = new byte[BUFFERSIZE];
        while ((count = gin.read(data, 0, BUFFERSIZE)) != -1) {
            os.write(data, 0, count);/*ww w.j  a v a2  s .  c  o  m*/
        }
        gin.close();
    }
}

Related

  1. unZip(InputStream is, String filename, String folderPath)
  2. unpackZip(InputStream zipStream, String unpackPath)
  3. unzip(InputStream fileIn, File dirOut)
  4. decompress(InputStream is, OutputStream os)
  5. decompress(InputStream is, OutputStream os)
  6. uncompress(InputStream inputStream)
  7. unpackZip(Context context, String s, InputStream is)
  8. readEntryAsWhatEverInternal( final ZipEntry entry, final InputStream unzippedInputStream)
  9. getZipFileList(InputStream is)