Yunqa • The Delphi Inspiration

Delphi Components and Applications

User Tools

Site Tools


products:brotli:index
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


products:brotli:index [2023/05/25 12:02] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== YuBrotli ======
  
 +{{page>header}}
 +
 +===== 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:
 +
 +  * [[https://github.com/google/brotli/issues/500|BrotliEncoderSetCustomDictionary() causes "false" OOM]]
 +  * [[https://github.com/google/brotli/issues/502#issuecomment-278178194|Wrong decompressed output]]
 +  
 +All these bugs are fixed in YuBrotli.
 +  
 +{{tag>Brotli Compression Freeware Google "Web Browser"}}  
products/brotli/index.txt · Last modified: 2023/05/25 12:02 by 127.0.0.1