package zipc

  1. Overview
  2. Docs

Adler-32 checksums.

Checksums

type t = uint32

The type for Adler-32 checksums.

val equal : t -> t -> bool

equal c0 c1 is true iff c0 and c1 are equal.

val check : expect:t -> found:t -> (unit, string) result

check ~expect ~found is Ok () iff equal exp found is true otherwise it errors with a human error message that mentions the checksums.

val pp : Format.formatter -> t -> unit

pp formats a checksum.

Computing

val string : ?start:int -> ?len:int -> string -> t

string s is the Adler-32 checksum of s in the range [start;start+len-1]. start defaults to 0 and length defaults to String.length b - start.

OCaml

Innovation. Community. Security.