Skip to content

Function: compressPayload()

ts
function compressPayload(
  buf: Buffer,
  options?: JobOptions,
): Promise<Buffer<ArrayBufferLike>>;

Gzip a buffer and prepend the "gz:" prefix. Passthrough if disabled.

Parameters

ParameterType
bufBuffer
options?JobOptions

Returns

Promise<Buffer<ArrayBufferLike>>