Skip to content

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
to_file "/tmp/backup.json.gz" {
write_ndjson
compress_gzip
}
export
write_ndjson
compress_gzip format="deflate"
from_file "in.gzip" {
decompress_gzip
read_ndjson
}
to_file "out.gzip" {
write_ndjson
compress_gzip level=18
}

Last updated: