Function ben::encode::jsonl_encode_xben
source · pub fn jsonl_encode_xben<R: BufRead, W: Write>(
reader: R,
writer: W
) -> Result<()>Expand description
This function takes a JSONL file and compresses it to the XBEN format.
The JSONL file is assumed to be formatted in the standard
{"assignment": [...], "sample": #}
format. While the BEN format is
a simple bit-packed (streamable!) run-length encoded assignment
vector, the XBEN format uses LZMA2 dictionary compression on
the byte level to achieve better compression ratios. In order
to use XBEN files, the decode_xben_to_ben function must be
used to decode the file back into a BEN format.