Code example for Deflater

Methods: getTotalIn

0
    /* 
     * Writes GZIP member trailer to a byte array, starting at a given offset. 
     */ 
    private void writeTrailer(byte[] buf, int offset) throws IOException {
        writeInt((int) crc.getValue(), buf, offset); // CRC-32 of uncompr. data
        writeInt(def.getTotalIn(), buf, offset + 4); // Number of uncompr. bytes
    } 
 
    /* 
     * Writes integer in Intel byte order to a byte array, starting at a given 
     * offset. 
     */ 
    private void writeInt(int i, byte[] buf, int offset) throws IOException {
        writeShort(i & 0xffff, buf, offset);
        writeShort((i >> 16) & 0xffff, buf, offset + 2);
    } 
 
    /* 
     * Writes short integer in Intel byte order to a byte array, starting at a 
     * given offset 
Stop searching for code, let great code find you!  Add Codota to your java IDE