Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitequark/ocaml-lz4
OCaml bindings for LZ4, a very fast lossless compression algorithm
https://github.com/whitequark/ocaml-lz4
Last synced: 17 days ago
JSON representation
OCaml bindings for LZ4, a very fast lossless compression algorithm
- Host: GitHub
- URL: https://github.com/whitequark/ocaml-lz4
- Owner: whitequark
- License: bsd-3-clause
- Created: 2014-05-17T03:11:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T14:54:37.000Z (about 1 year ago)
- Last Synced: 2024-10-13T01:45:46.326Z (about 1 month ago)
- Language: OCaml
- Size: 442 KB
- Stars: 26
- Watchers: 7
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OCaml LZ4 bindings [![build](https://github.com/whitequark/ocaml-lz4/actions/workflows/main.yml/badge.svg)](https://github.com/whitequark/ocaml-lz4/actions/workflows/main.yml)
This package contains bindings for [LZ4][], a very fast lossless compression
algorithm.[lz4]: https://code.google.com/p/lz4/
Installation
------------The bindings are available via [OPAM](https://opam.ocaml.org):
$ opam install lz4
Alternatively, you can do it manually:
$ opam install dune ctypes
$ make all installUsage
-----The bindings are contained in findlib package `lz4`.
To roundtrip some data:
``` ocaml
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](http://whitequark.github.io/ocaml-lz4/).
License
-------[3-clause BSD](LICENSE.txt) (same as LZ4).