Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DeflatePro
#1
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:

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.

[Image: Screenshot-2024-12-20-223703.png]


FAQ:
Q: Why did you do this?
A: Why not? Ok, just for fun.


Attached Files
.zip   DeflatePro.zip (Size: 31.64 KB / Downloads: 120)
Reply


Messages In This Thread
DeflatePro - by a740g - 12-20-2024, 06:04 PM
RE: DeflatePro - by Petr - 12-20-2024, 07:54 PM
RE: DeflatePro - by a740g - 12-21-2024, 02:11 AM
RE: DeflatePro - by Sanmayce - 12-26-2024, 01:42 PM
RE: DeflatePro - by aadityap0901 - 12-26-2024, 03:35 PM
RE: DeflatePro - by a740g - 12-27-2024, 12:17 AM
RE: DeflatePro - by aadityap0901 - 12-27-2024, 08:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)