Code example for Inflater

Methods: inflatesetInput

     * i.e., the same algorithms used to compress .jar files 
    private static byte[] expand(byte[] bytes, int skip)
        byte[] newBytes = new byte[bytes.length - skip];
        Inflater inflater = new Inflater();
        inflater.setInput(bytes, skip, newBytes.length);
            int outCount = inflater.inflate(newBytes);
            System.arraycopy(newBytes, 0, bytes, skip, outCount);
            Arrays.fill(bytes, skip + outCount, bytes.length, (byte) 0);
            return bytes;
        catch (DataFormatException e)
        { } 
        return null; 
Contextual code suggestions in your IDE  Get Codota for Java