Source file ozstd.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(** Zstandard (zstd) compression and decompression library.

    Zstandard is a fast, lossless compression algorithm developed by Facebook.
    This library provides OCaml bindings to the reference C implementation. *)

(** {2 Compression and decompression} *)

module Compressor = Compressor
module Decompressor = Decompressor

(** {2 Miscellaneous} *)

module Dictionary = Dictionary

(** Returns the version of the linked libzstd C library as a triple
    [(major, minor, patch)].*)
let version () =
  let v = Bindings.version () in
  (v / 10_000, v / 100 mod 100, v mod 100)

(** {2 Internals} *)

module Bindings_intf = Bindings