Code example for Adler32

Methods: getValue, reset, update

0
        } catch (Throwable t) {
            // do nothing 
        } 
    } 
 
    static int readInt(byte[] buf, int offset) {
        return (buf[offset] & 0xff)
                | ((buf[offset + 1] & 0xff) << 8)
                | ((buf[offset + 2] & 0xff) << 16)
                | ((buf[offset + 3] & 0xff) << 24);
    } 
 
    static long readLong(byte[] buf, int offset) {
        long result = buf[offset + 7] & 0xff;
        for (int i = 6; i >= 0; i--) {
            result = (result << 8) | (buf[offset + i] & 0xff);
        } 
        return result;
    } 
 
    static void writeInt(byte[] buf, int offset, int value) {