Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Compresses a stream of bytes.

compress codec:string, [level=int]

The compress operator compresses bytes in a pipeline incrementally with a known codec.

An identifier of the codec to use. Currently supported are brotli, bz2, gzip, lz4, and zstd.

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

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"

Recompress a Zstd-compressed file at a higher compression level

Section titled “Recompress a Zstd-compressed file at a higher compression level”
load_file "in.zst"
decompress "zstd"
compress "zstd", level=18
save_file "out.zst"

Last updated: