Skip to content

compress_gzip

Compresses a stream of bytes using gzip compression.

compress_gzip [level=int, window_bits=int, format=string]

The compress_gzip operator compresses bytes in a pipeline incrementally.

The compression level to use. The supported values depend on the codec used. If omitted, the default level for the codec is used.

A number representing the encoder window bits.

A string representing the used format. Possible values are zlib, deflate and gzip.

Defaults to gzip.

Export all events in a Gzip-compressed NDJSON file

Section titled “Export all events in a Gzip-compressed NDJSON file”
export
write_ndjson
compress_gzip
save_file "/tmp/backup.json.gz"
export
write_ndjson
compress_gzip format="deflate"

Recompress a Gzip-compressed file at a different compression level

Section titled “Recompress a Gzip-compressed file at a different compression level”
load_file "in.gzip"
decompress_gzip
compress_gzip level=18
save_file "out.gzip"

compress_brotli, compress_bz2, compress_lz4, compress_zstd, decompress_gzip