TnefPropertyWriterOpenRtfCompressedStream Method

Open a stream for writing a compressed RTF value.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Stream OpenRtfCompressedStream(
	bool compress = true
)

Parameters

compress  Boolean  (Optional)
to compress the RTF; otherwise, .

Return Value

Stream
The compressed RTF stream.

Remarks

Opens a stream that encodes the RTF that is written to it as a compressed RTF value of a Binary property, such as RtfCompressed, as defined by [MS-OXRTFCP].

If compress is , the RTF is compressed using Compressed; otherwise, it is stored using Uncompressed.

The value is completed when the stream is disposed. No other value or property may be written until then.

Exceptions

ObjectDisposedException The property writer has been disposed.
InvalidOperationException

The current property is not a Binary property.

-or-

The current property already has a value.

-or-

The stream or writer for the previous value has not been disposed.

See Also