package checkseum
Library
Module
Module type
Parameter
Class
Class type
Implementation of the ADLER-32 cheksum.
type t = Optint.t
Representation of the checksum value.
val pp : Format.formatter -> t -> unit
Pretty-printer of t
.
digest_bytes msg off len t
is the digest of msg
at off
on len
byte(s).
unsafe_digest_bytes msg off len t
is the same as digest_bytes
without bound-checking.
Same as digest_bytes
but for String.t
.
unsafe_digest_string msg off len t
is the same as digest_string
without bound-checking.
Same as digest_bytes
but for bigstring
.
unsafe_digest_bigstring msg off len t
is the same as digest_bigstring
without bound-checking.
val to_int32 : t -> int32
to_int32 crc
casts crc
to an unsigned int32
value. We precise unsigned because every bits are significant for the checksum (even the sign bit). We interpret the given int32
as a value where the sign bit does not have any signification (hence the unsigned).