Framework EDI Reference. Methods and Properties
mailMessage. PrepareCompressData

Compresses the message to Cryptographic Message Syntax (CMS) CompressedData format.

Syntax:

Returns:

Returns 1 if the operation is successful; otherwise returns 0 if the operation fails.

Remarks:

Compresses the entire header and body content of the message into CompressedData format.  The compressed data becomes the body of the message, and the following set of headers replace the old set:

 

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Disable auto-processing so that message can be secure as is.
oMailDocument.Option(MailDocOpt_Auto) = 0

' Load the mail document
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get the message.
Set oMessage = oMailDocument.GetMessage

' Compress message.
oMessage.PrepareCompressData

oMessage.Save App.Path & "\CompressOutput.TXT"

MsgBox "Done"

Sample

M_PrepareCompressData.zip

See Also.

RFC 1951 - DEFLATE Compressed Data Format Specification version 1.3.