Rtf Compressed To Rtf Class
A filter to decompress a compressed RTF stream.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public class RtfCompressedToRtf : MimeFilterBase- Inheritance
- Object MimeFilterBase RtfCompressedToRtf
Remarks
Used to decompress a compressed RTF stream.
Example
C#
public static void DecompressRtf (byte[] rtfCompressed, Stream output)
{
// The RtfCompressedToRtf filter decompresses the value of a PidTagRtfCompressed property ([MS-OXRTFCP]),
// such as the value read by TnefPropertyReader.ReadValueAsBytes () or the raw content of a
// TnefMessage's RtfBody (which TnefMessageBody.OpenDecodedRead () can also decompress for you).
var filter = new RtfCompressedToRtf ();
using (var filtered = new FilteredStream (output)) {
filtered.Add (filter);
filtered.Write (rtfCompressed, 0, rtfCompressed.Length);
filtered.Flush ();
}
if (!filter.IsValidCrc32)
Console.WriteLine ("The compressed RTF has an invalid CRC32 checksum.");
}
Constructors
| RtfCompressedToRtf | Initialize a new instance of the RtfCompressedToRtf class. |
Properties
| CompressionMode | Get the compression mode. |
| IsValidCrc32 | Get a value indicating whether the crc32 is valid. |
| OutputBuffer |
Get the output buffer.
(Inherited from MimeFilterBase) |
Methods
| EnsureOutputSize |
Ensure that the output buffer is greater than or equal to the specified size.
(Inherited from MimeFilterBase) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Filter(Byte, Int32, Int32, Int32, Int32) |
Filter the specified input.
(Inherited from MimeFilterBase) |
| Filter(Byte, Int32, Int32, Int32, Int32, Boolean) |
Filter the specified input.
(Overrides MimeFilterBaseFilter(Byte, Int32, Int32, Int32, Int32, Boolean)) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| Flush |
Filter the specified input, flushing all internally buffered data to the output.
(Inherited from MimeFilterBase) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| Reset |
Reset the filter.
(Overrides MimeFilterBaseReset) |
| SaveRemainingInput |
Save the remaining input for the next round of processing.
(Inherited from MimeFilterBase) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |