Function ben::decode::jsonl_decode_ben
source · pub fn jsonl_decode_ben<R: Read, W: Write>(reader: R, writer: W) -> Result<()>Expand description
This function takes a reader containing a file encoded in the BEN format and decodes it into a JSONL file.
The output JSONL file will have the formatting
{"assignment": [...], "sample": #}
§Arguments
reader- A reader containing the ben encoded assignment vectorswriter- 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 ben data or if the the decode method encounters while trying to extract a single assignment vector, that error is then propagated.