StringUtility.CreateCompressingTextWriter method

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.

Return Value

The TextWriter.

Remarks

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.

See Also