package zstandard

  1. Overview
  2. Docs

Module Streaming.CompressionSource

Sourcetype t
Sourceval create : int -> t
Sourceval compress : t -> inbuf:Core.Bigstring.t -> inpos:int -> inlen:int -> outbuf:Core.Bigstring.t -> outpos:int -> outlen:int -> int * int
Sourceval flush : t -> outbuf:Core.Bigstring.t -> outpos:int -> outlen:int -> int * int

Attempts to flush the contents of the internal buffers of t. If the output size is too small, a single invocation of the function might not be sufficient to flush the buffer.

Sourceval endstream : t -> outbuf:Core.Bigstring.t -> outpos:int -> outlen:int -> int * int

Performs a flush and write an epilogue for the stream. The epilogue is required for decoders to consider the message complete.

Sourceval free : t -> unit

free t deallocate the underlying datastructure. Subsequent uses of t will cause exceptions.