Yunqa • The Delphi Inspiration

Delphi Components and Applications

User Tools

Site Tools


products:mime:index

DIMime

DIMime is a fast Base64 (MIME) encoding and decodinglibrary. It has an API for buffers, strings, and streams, suitable to encode or decode e-mails and network transfer.

Overview

DIMime consists of two core functions, MimeEncode() and MimeDecode(), both written in optimized Pascal and faster than most assembler code. They have a simple but flexible interface which makes it easy to use them with memory buffers, strings, or other types of data. Additional helper functions are available to convert, among others, streams of practically unlimited size.

The decoder is very error tolerant and does about spaces, line-breaks, or incomplete data, which are sometimes encountered in e-mail messages.

The DIMime package contains full source code and HTML Help documentation. It has also been incorporated into the Jedi Code Library (JCL).

How to encode / decode huge files?

Some users wondered if it is possible to encode and decode very large files with DIMime without loading the entire file into memory?

Yes, this is easily possible: Use the following functions from DIMimeStreams.pas – they process files in small blocks of data at a time only:

  • MimeEncodeFile()
  • MimeEncodeFileNoCRLF()
  • MimeDecodeFile()
products/mime/index.txt · Last modified: 2022/02/04 17:01 by 127.0.0.1