When I use FrameEncoder, the last part of the file is not actually written properly:
let output = Box::new(lz4_flex::frame::FrameEncoder::new(File::create(output)?));
// many write calls
output.flush()?;
Using lz4cat on resulting file gives Error 68: unfinished stream.
I need this boxing because I am generalizing multiple output backends with Box<dyn Write>. I am not sure if this is causing the issue here, but flate2 with its gzip decoder closes files properly.
When I use
FrameEncoder, the last part of the file is not actually written properly:Using
lz4caton resulting file givesError 68: unfinished stream.I need this boxing because I am generalizing multiple output backends with
Box<dyn Write>. I am not sure if this is causing the issue here, butflate2with its gzip decoder closes files properly.