Skip to main content

Gzip.Encoder

Examples below assume this module is imported with an imports: entry under alias Gzip. Kind references follow that alias — substitute your own if you import it under a different name.

Compresses a Stream<Uint8Array> into a gzip Stream<Uint8Array>, wrapping Node's zlib.createGzip(). Implements the Codec.Encoder contract. The output stays a stream so it pipes directly into a sink (an HTTP response, S3.Put, …).


Example

- name: compress
inputs: { input: "${{ steps.pack.result.output }}" }
invoke: { kind: Gzip.Encoder, name: Compress }

Invocation inputs

InputTypeRequiredDescription
inputStream<Uint8Array>yesUncompressed byte stream.

Output

FieldTypeDescription
outputStream<Uint8Array>Gzip-compressed byte stream.