package checkseum

  1. Overview
  2. Docs
Adler-32, CRC32 and CRC32-C implementation in C and OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

checkseum-v0.2.1.tbz
sha256=c50eb8e499d870cea25471ced126e718a5d1cc8b34a99960239a5d6218218beb
sha512=45e625ab37b93cd7888e3b633bc76e2db61be4cc51659115d128d59c6ebd03ce8fbeefdfabc799d5a257fdb8404a5b3b03c7ca4c5c5e45877fc6d35c758e350d

Description

Checkseum is a library to provide implementation of Adler-32, CRC32 and CRC32-C in C and OCaml.

This library use the linking trick to choose between the C implementation (checkseum.c) or the OCaml implementation (checkseum.ocaml). This library is on top of optint to get the best representation of an int32.

Published: 16 Jun 2020

README

Checkseum

Chekseum is a library which implements ADLER-32 and CRC32C Cyclic Redundancy Check. It provides 2 implementation, the first in C and the second in OCaml. The library is on top of optint to get the best representation of the CRC in the OCaml world.

Linking trick / variant

Then, as digestif, checkseum uses the linking trick. So if you want to use checkseum in a library, you can link with the checkseum package which does not provide an implementation. Then, end-user can choose between the C implementation or the OCaml implementation (both work on Mirage).

So, in utop, to be able to fully use checkseum, you need to write:

$ utop -require checkseum.c

or

$ utop -require checkseum.ocaml

In a dune workspace, the build-system is able to choose silently default implementation (checkseum.c) for your executable if you don't specify one of them. A dune-library is not able to choose an implementatio but still able to use the virtual library checkseum.

Build Requirements

  • OCaml >= 4.03.0

  • base-bytes

  • base-bigarray

  • dune to build

  • optint

Dependencies (6)

  1. bigarray-compat
  2. base-bytes
  3. optint >= "0.0.3" & < "0.0.5"
  4. dune-configurator
  5. dune >= "2.6.0"
  6. ocaml >= "4.07.0"

Dev Dependencies (7)

  1. ocamlfind build & with-test
  2. rresult with-test
  3. fpath with-test
  4. fmt with-test
  5. astring with-test
  6. bos with-test
  7. alcotest with-test

Used by (10)

  1. albatross < "2.2.0"
  2. carton < "0.4.3"
  3. decompress >= "0.8" & != "1.4.2"
  4. esperanto-cosmopolitan >= "0.0.5"
  5. git >= "2.0.0" & < "3.9.1"
  6. gptar
  7. irmin-pack >= "3.5.0"
  8. octez-internal-libs
  9. oneffs
  10. rfc1951 < "1.0.0" | >= "1.3.0"

Conflicts (2)

  1. ocaml-freestanding < "0.4.3"
  2. mirage-xen-posix < "3.1.0"
OCaml

Innovation. Community. Security.