Yunqa • The Delphi Inspiration

Delphi Components and Applications

User Tools

Site Tools


products:brotli:index

YuBrotli

YuBrotli brings the new Brotli compression algorithm to Delphi (Embarcadero, CodeGear, Borland). TStream, buffer & string wrappers. No-DLL implementation. Freeware.

What is YuBrotli?

YuBrotli brings the new Brotli compression algorithm to Delphi (Embarcadero, CodeGear, Borland).

Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. Its compression speed is similar with deflate but offers more dense compression with faster decompression.

The Brotli algorithm was developed by Google to speed up the Internet and has made its way into major web browsers like Chrome, Edge, Firefox, and Opera. Is is praised as the future of web compression.

The YuBrotli Delphi implementation requires no DLLs. YuBrotli is free to use without royalties. The YuBrotli Pascal Source Code is available for purchase.

Delphi Wrappers

YuBrotli usage is similar to Delphi's zlib usage. There are TStream compression / decompression wrappers as well as functions to compress / decompress streams, strings, and data in memory buffers.

Delphi TStream Brotli compression & decompression wrappers:

  • class TBrotliCompressionStream
  • class TBrotliDecompressionStream

Delphi TStream Brotli compression & decompression procedures:

  • procedure BrotliCompressStream
  • procedure BrotliDecompressStream

Delphi memory Brotli compression & decompression procedures:

  • procedure BrotliCompress
  • procedure BrotliDecompress

Delphi string Brotli compression & decompression functions:

  • function BrotliCompressStr
  • function BrotliDecompressStr

Native API

The YuBrotli interface includes the complete Brotli native API. This allows to target specific compression / decompression needs, for example by fine-tuning more options, setting up device-specific data handlers, and more.

Testing

Before each release, YuBrotli is tested to ensure it behaves as expected and is compatible with other Brotli implementations. This detected some bugs in the original Brotli C code, reported here:

All these bugs are fixed in YuBrotli.

products/brotli/index.txt · Last modified: 2023/05/25 12:02 by 127.0.0.1