Encoder.Flush() flushes underlying stream