quixdb / squash

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

Slice: When trying mmap, don't retry if mmaping was successful, and the codec failed #201

Closed Dr-Emann closed 8 years ago

Dr-Emann commented 8 years ago

This prevents squash_splice from attempting to fall back to streaming if the (de)compression fails: the fallback only occurs if mmapping fails. In the worst case, this meant (de)compression would be attempted twice or almost the entirety of the input, if the codec failed on data at the end of the file.

nemequ commented 8 years ago

Thanks!

Not sure why CI didn't run on the PR, but https://travis-ci.org/quixdb/squash/builds/136597517 and https://ci.appveyor.com/project/quixdb/squash/build/439 look okay. I've edited your commit message a bit (in the future, please limit lines in commit messages to <= 72 characters) and merged as 92cb5d2045de4b26960742c4100ed216f05bc5fb