@@ -0,0 +1,1942 @@
+package com.qiniu.android.utils;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.io.RandomAccessFile;%0Aimport java.util.zip.GZIPInputStream;%0Aimport java.util.zip.GZIPOutputStream;%0A%0Apublic class GZipUtil %7B%0A%0A    public static byte%5B%5D gZip(String string)%7B%0A        if (string == null)%7B%0A            return null;%0A        %7D%0A        return gZip(string.getBytes());%0A    %7D%0A%0A    public static byte%5B%5D gZip(byte%5B%5D bytes)%7B%0A        if (bytes == null)%7B%0A            return null;%0A        %7D%0A        if (bytes.length == 0)%7B%0A            return bytes;%0A        %7D%0A%0A        ByteArrayOutputStream out = new ByteArrayOutputStream();%0A        GZIPOutputStream gzip = null;%0A        try %7B%0A            gzip = new GZIPOutputStream(out);%0A            gzip.write(bytes);%0A        %7D catch (IOException e)%7B%0A        %7D finally %7B%0A            if (gzip != null)%7B%0A                try %7B%0A                    gzip.close();%0A                %7D catch (IOException e)%7B%0A                %7D%0A            %7D%0A        %7D%0A%0A        return out.toByteArray();%0A    %7D%0A%0A    public static byte%5B%5D gUnzip(byte%5B%5D bytes) %7B%0A        if (bytes == null)%7B%0A            return null;%0A        %7D%0A        if (bytes.length == 0)%7B%0A            return bytes;%0A        %7D%0A%0A        ByteArrayOutputStream out = new ByteArrayOutputStream();%0A        ByteArrayInputStream in = new ByteArrayInputStream(bytes);%0A%0A        GZIPInputStream gunzip = null;%0A        try %7B%0A            gunzip = new GZIPInputStream(in);%0A            byte%5B%5D buffer = new byte%5B256%5D;%0A            int n;%0A            while ((n = gunzip.read(buffer)) %3E= 0) %7B%0A                out.write(buffer, 0, n);%0A            %7D%0A        %7D catch (IOException e) %7B%0A        %7D finally %7B%0A            if (gunzip != null) %7B%0A                try %7B%0A                    gunzip.close();%0A                %7D catch (IOException e) %7B%0A                %7D%0A            %7D%0A        %7D%0A%0A        return out.toByteArray();%0A    %7D%0A%7D%0A

add GZipUtil.java