Base64 Encode/Decode

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2010-09-24 in Download section
Base64 Encode/Decode
Encode & Decode functions for conversion Instream to Outstream

http://www.mibuso.com/dlinfo.asp?FileID=1198

Discuss this download here.

Comments

  • Remco_ReinkingRemco_Reinking Member Posts: 74
    edited 2010-09-24
    -- did contain some characters that crashes IE en FireFox
  • Remco_ReinkingRemco_Reinking Member Posts: 74
    Base64 Encode/Decode
    Encode & Decode functions for conversion Instream to Outstream

    http://www.mibuso.com/dlinfo.asp?FileID=1198

    Discuss this download here.

    How about this one:
    It is really fast and uses automation from Commerce Gateway, as used in codeunit "BizTalk XML DOM Management"
    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
    
    



    Did some small test with a PDFfile, and this one was about 1000 times faster (10 sec compared with 0,01 sec)
Sign In or Register to comment.