package pcrc

  1. Overview
  2. Docs

Module Make.UpdateSource

Streaming interface for CRC computations.

Sourceval init : t

The initial value for a new CRC computation.

Sourceval string : ?pos:int -> ?len:int -> t -> string -> t

string crc s updates the CRC with data from the string s.

  • parameter pos

    offset to start reading the string data (0 if unspecified)

  • parameter len

    how many elements (bytes) of the string to read (if unspecified, read to the end of string)

Sourceval bytes : ?pos:int -> ?len:int -> t -> bytes -> t

Like Update.string function but for bytes data.

Sourceval bigarray : ?pos:int -> ?len:int -> t -> ('a, 'b, 'c) Bigarray.Array1.t -> t

Like Update.bytes function but for one-dimensional Bigarray data.

Sourceval finalize : t -> t

finalize crc returns the final CRC value.

Sourcemodule Unsafe : sig ... end

Low-level unsafe functions.