Creates a TextWriter that writes compressed text to a stream that matches the format used by Compress.
public static TextWriter CreateCompressingTextWriter(Stream stream, Ownership ownership)
parameter | description |
---|---|
stream | The stream. |
ownership | The ownership of the stream. |
The TextWriter.
The stream must be seekable so that the stream header can be finalized once the compression is copmlete. The contents of the stream are not valid until the TextWriter has been closed.