Function zip

Wrap an iopipe of ubytes into an iopipe containing the compressed data from that input. Data is not compressed in place, so an extra buffer is created to hold it.

auto auto zip(Allocator, Chain) (
  Chain c,
  CompressionFormat format = CompressionFormat.init
)
if (isIopipe!Chain && is(WindowType!Chain : const(ubyte)[]));

Parameters

NameDescription
Allocator The allocator to use for buffering the data.
c The input iopipe that provides the input data. The window type MUST be implicitly convertable to an array of const ubytes.
format The desired format of the compressed data. The default is gzip.

Returns

An iopipe whose data is the compressed ubyte version of the input stream.