Function ben::decode::jsonl_decode_xben

source ·
pub fn jsonl_decode_xben<R: BufRead, W: Write>(
    reader: R,
    writer: W
) -> Result<()>
Expand description

This function takes a reader containing a file encoded in the XBEN format and decodes it into a JSONL file.

The output JSONL file will have the formatting

{"assignment": [...], "sample": #}

§Arguments

  • reader - A reader containing the xben encoded assignment vectors
  • writer - A writer that will contain the JSONL formatted assignment vectors

§Returns

An io::Result containing the result of the operation

§Errors

This function will return an error if the input reader contains invalid xben data or if the the decode method encounters while trying to extract a single assignment vector, that error is then propagated.