BurntSushi / rust-snappy

Snappy compression implemented in Rust (including the Snappy frame format).
BSD 3-Clause "New" or "Revised" License
444 stars 43 forks source link

FrameDecoder returns EOF for any input < 4 bytes #42

Closed arthurprs closed 3 years ago

arthurprs commented 3 years ago

FrameDecoder returns EOF it it can't get a full block header (4 bytes) from the reader, so any input < 4 bytes returns EOF. I'm not sure if that's intended or not.

BurntSushi commented 3 years ago

Probably not. Sounds like a bug. I'm not sure when I'll have a chance to work on fixing this though. Patches welcome.