This is a QB64 _INFLATE$ compatible compression library. Internally it uses Google's Zopfli. Zopfli is a highly optimized C-based compression library designed to produce efficient (though slow) Deflate or zlib-compressed data. The advantage is that the compressed data is fully compatible with QB64’s _INFLATE$ function, allowing seamless decompression.
The library contains a single function:
The attached file has a test program in the zip root and the library inside the "include" directory. Use it however you see fit.
FAQ:
Q: Why did you do this?
A: Why not? Ok, just for fun.
The library contains a single function:
Code: (Select All)
' @brief Compresses a STRING buffer using the Deflate algorithm with Zopfli. The output can be decompressed using QB64's _INFLATE$ function.
' @param inputBuffer The STRING buffer to compress.
' @param compressionLevel The compression level to use (0 - 65535). 65535 provides the highest compression, while 0 uses the library’s default. Levels above 255 may yield diminishing returns and are extremely slow.
' @return The compressed string.
FUNCTION DeflatePro$ (inputBuffer AS STRING, compressionLevel AS _UNSIGNED INTEGER)
The attached file has a test program in the zip root and the library inside the "include" directory. Use it however you see fit.
FAQ:
Q: Why did you do this?
A: Why not? Ok, just for fun.