Skip to content

lz4 writer does not close properly #94

@rongcuid

Description

@rongcuid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions