propagate datastream errors

zlib can fail
Add: basic test-gzip-errors
Merge pull request #1046 from ZJONSSON/patch-1

Propagate datastream errors, useful in case gzip fails.