Module Zstandard.Input
type tZstd exposes multiple API flavors which can be used to transform strings into strings. The
ttype encodes the various ways to pass a string from the OCaml world to ZStd functions.
val from_string : ?pos:int -> ?len:int -> string -> tfrom_string ?pos ?len swill pass the content ofsto Zstd functions. This incurs a copy of the OCaml string whenfrom_stringis called.
val from_bytes : ?pos:int -> ?len:int -> Core_kernel.Bytes.t -> tfrom_bytes ?pos ?len swill pass the content ofsto Zstd functions. This incurs an allocation of a buffer of sizelenwhen callingfrom_bytes, and a copy of the ocaml bytes each time the resultingtis used by a compression / decompression function.
val from_bigstring : ?pos:int -> ?len:int -> Core_kernel.Bigstring.t -> tfrom_bigstring ?pos ?len swill pass the content ofsbetweenposandpos+lento Zstd functions. This does not incur a copy.