pierrec / lz4

LZ4 compression and decompression in pure Go
BSD 3-Clause "New" or "Revised" License
878 stars 142 forks source link

Writer: initialize the writer on Flush() if wasn't initialized before #212

Closed edigaryev closed 11 months ago

edigaryev commented 11 months ago

This allows compressing empty files, because without this change the proper headers were not emitted when reading an empty file via e.g. io.Copy().