lz4_flex icon indicating copy to clipboard operation
lz4_flex copied to clipboard

Handling missing lz4 terminator on graceless shutdown

Open l4l opened this issue 2 years ago • 8 comments

I have long-living process that writes to a file with compression. It may happen that the process is been killed leading to a file not being flushed properly even with auto_finish (#95). Sometimes it may happen that the data has been written completely but only a lz4 ending (EndMark + Checksum) is missing. What's the preferable way of handling this case? Currently reading such block leading to error like "failed to fill whole buffer" which happens because of Read::read_exact.

l4l avatar May 18 '23 10:05 l4l