It looks like you're new here. Sign in or register to get started.
Administrator wrote: Base64 Encode/Decode Encode & Decode functions for conversion Instream to Outstreamhttp://www.mibuso.com/dlinfo.asp?FileID=1198 Discuss this download here.
CREATE( CGBase64); CREATE( DOMDoc); CREATE( ADOStream); DOMNode := DOMDoc.createElement('b64'); // just a dummy to do the conversion CGBase64.Encode( iTxtFileName, DOMNode); ADOStream.Type := 2; // text ADOStream.Charset := 'us-ascii'; ADOStream.Open; ADOStream.WriteText( DOMNode.nodeTypedValue); IF EXISTS( iTxtFileName+'.b64') THEN ERASE( iTxtFileName+'.b64'); ADOStream.SaveToFile( iTxtFileName+'.b64'); ADOStream.Flush; ADOStream.Close; CLEAR( ADOStream); CLEAR( DOMNode); CLEAR( DOMDoc); CLEAR( CGBase64); with variables : CGBase64 Automation 'CG Request Client'.Base64 DOMNode Automation 'Microsoft XML, v6.0'.IXMLDOMNode DOMDoc Automation 'Microsoft XML, v6.0'.DOMDocument ADOStream Automation 'Microsoft ActiveX Data Objects 2.7 Library'.Stream
Comments
How about this one:
It is really fast and uses automation from Commerce Gateway, as used in codeunit "BizTalk XML DOM Management"
Did some small test with a PDFfile, and this one was about 1000 times faster (10 sec compared with 0,01 sec)