quixdb / squash

Compression abstraction library and utilities
https://quixdb.github.io/squash/
MIT License
407 stars 53 forks source link

Test for compressing 0-length data #207

Open nemequ opened 8 years ago

nemequ commented 8 years ago

I was just looking at Cyan4973/lz4#157. We probably need to figure something out for 0-length data. If we find an issue, we should talk to upstreams about whether or not they want to allow compressing 0 bytes. For those who don't, we could add an option flag to Squash to indicate that and just return SQUASH_OK with 0-bytes of output for both compression and decompression… it wouldn't really be compatible with other tools, but it's probably better than nothing.