code: public static byte[] decompressByGzip(byte[] sourceBytes) {
          byte[] buffer = null;
          ByteArrayOutputStream out = null;
          ByteArrayInputStream in = null;
          GZIPInputStream gzip = null;
          try {
              out = new ByteArrayOutputStream();
              buffer = new byte[CHUNK_SIZE];
              in = new ByteArrayInputStream(sourceBytes);
              gzip = new GZIPInputStream(in);
              int len = 0;
              while ((len = gzip.read(buffer, 0, CHUNK_SIZE)) != -1) {
                  out.write(buffer, 0, len);
              }
              return out.toByteArray();
          } catch (IOException ex) {
              Log.w(Log.TAG, "Failed to decompress gzipped data: " + ex.getMessage());
              return null;
          } finally {
              try {
                  if (out != null) {
                      out.close();
                  }
              } catch (IOException ex) {
              }
              try {
                  if (in != null) {
                      in.close();
                  }
              } catch (IOException ex) {
              }
              try {
                  if (gzip != null) {
                      gzip.close();
                  }
              } catch (IOException ex) {
              }
          }
      }
docs: 1024 * 8