Skip to content

Compresses a stream of bytes using bz2 compression.

compress_bz2 [level=int]

The compress_bz2 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.

Export all events in a Bzip2-compressed NDJSON file

Section titled “Export all events in a Bzip2-compressed NDJSON file”
export
to_file "/tmp/backup.json.bz2" {
write_ndjson
compress_bz2
}
from_file "in.bz2" {
decompress_bz2
read_ndjson
}
to_file "out.bz2" {
write_ndjson
compress_bz2 level=18
}

Last updated: