package lz4

  1. Overview
  2. Docs
Bindings to the LZ4 compression algorithm

Install

Dune Dependency

Authors

Maintainers

Sources

lz4-1.3.0.tbz
sha256=3cbbd2003916442d8ec797e48f0c8433e1a50e98c549777ad0de2e0fb774248e
sha512=54859f27d4b7c9d60be056951f0dd8617fabe7400c0a35842bb65c7f795d1859dbfec678ceea82f9c3d3521f97e7b049d06553a21a70d50d8ba69c83d4031290

Description

Tags

lz4 compression decompression

Published: 07 Sep 2023

README

OCaml LZ4 bindings

This package contains bindings for LZ4, a very fast lossless compression algorithm.

Installation

The bindings are available via OPAM:

$ opam install lz4

Alternatively, you can do it manually:

$ opam install dune ctypes
$ make all install

Usage

The bindings are contained in findlib package lz4.

To roundtrip some data:

let data         = "wild wild fox" in
let compressed   = LZ4.Bytes.compress (Bytes.of_string data) in
let decompressed = LZ4.Bytes.decompress ~length:(String.length data) compressed in
Printf.printf "%S\n" (Bytes.to_string decompressed) (* => "wild wild fox" *)

Documentation

The API documentation is available at GitHub pages.

License

3-clause BSD (same as LZ4).

Dependencies (5)

  1. ctypes >= "0.4.1"
  2. dune-configurator
  3. dune >= "2.0"
  4. conf-liblz4
  5. ocaml >= "4.02"

Dev Dependencies (2)

  1. odoc with-doc
  2. ounit2 with-test

Used by (3)

  1. dokeysto < "2.0.0"
  2. dokeysto_lz4
  3. pardi >= "2.0.2" & < "3.2.2"

Conflicts

None

OCaml

Innovation. Community. Security.