Compresses a stream of bytes using bz2 compression.
compress_bz2 [level=int]Description
Section titled “Description”The compress_bz2 operator compresses bytes in a pipeline incrementally.
level = int (optional)
Section titled “level = int (optional)”The compression level to use. The supported values depend on the codec used. If omitted, the default level for the codec is used.
Examples
Section titled “Examples”Export all events in a Bzip2-compressed NDJSON file
Section titled “Export all events in a Bzip2-compressed NDJSON file”exportto_file "/tmp/backup.json.bz2" { write_ndjson compress_bz2}Read and write Bzip2-compressed NDJSON
Section titled “Read and write Bzip2-compressed NDJSON”from_file "in.bz2" { decompress_bz2 read_ndjson}to_file "out.bz2" { write_ndjson compress_bz2 level=18}