package zstandard

  1. Overview
  2. Docs
type 'a t

Zstd exposes multiple API flavors which can be used to transform strings into strings. The 'a t type encodes the various ways to return a string from Zstd's functions into the OCaml world.

val in_buffer : ?pos:int -> ?len:int -> Core.Bigstring.t -> int t

Passing in_buffer s ~pos ~len to Zstd functions will cause them to output their result in the buffer s.(pos) ... s.(pos+len), and return the actual length that was used.

val in_iobuf : (Core.read_write, Core.Iobuf.seek) Core.Iobuf.t -> unit t

Passing in_buffer iobuf to Zstd functions will cause them to output their result in the iobuf.

val allocate_string : size_limit:int option -> string t

Passing allocate_string to Zstd functions will cause them to allocate an ocaml string to contain their result.

val allocate_bigstring : size_limit:int option -> Core.Bigstring.t t

Passing allocate_bigstring to Zstd functions will cause them to allocate an ocaml string to contain their result.

OCaml

Innovation. Community. Security.