SnappyStream.Flush does not flush the underlying stream when writing
Issue #4
wontfix
Originally submitted by (former user).
Calling SnappyStream.Flush does not flush the underlying stream when using compress mode.
For example, when using SnappyStream with a FileStream, flushing the snappy stream should write the bytes to disk and flush them but it does not. This can lead to lost data if the program crashes before closing the snappy stream (as would be the case when writing an infinite stream, like a log file).
If you do not want to make flushing the downstream stream the default, there should at least be a constructor option for doing so.
Comments (2)
-
reporter -
reporter - changed status to wontfix
This library is no longer maintained. Feed free to adopt it if you find it useful.
- Log in to comment
I can confirm this is indeed a bug in
SnappyStream.Flush
. The current workaround is to callClose
(or wrap your code inusing
statement).SnappyStream.Close
callsClose
on the underlying stream, which will flush it. There is no workaround for infinite streams.