bzip3 is a compression algorithm/library which is meant as a successor to bzip2, but from a different developer.
It is lightning fast and can outperform LZMA on very large files in compression ratio. In my tests LZMA has much better compression ratio on small files.
This is probably the best lib for a balanced compression ratio and speed balance.
https://github.com/kspalaiologos/bzip3
I compiled a static lib for Windows and made a PB include to use it in PureBasic.
Download
bzip3 compression
Re: bzip3 compression
Updated the lib with 2 crash fixes. It's not a new official release but can't have it crash, so i included the fixes and recompiled it.
There is another problem in which compression fails with status ok in a specific case, which should be fixed soon by the author of bzip3.
There is another problem in which compression fails with status ok in a specific case, which should be fixed soon by the author of bzip3.
Re: bzip3 compression
It seems to be using the LGPL license which exclude static linking unless you open all your source. Using it as a DLL is fine though.
Re: bzip3 compression
Thanks, this does look very promising.
FWIW, the LGPL license allows static linking with a catch. Your app must allow end users to upgrade or downgrade any LGPL content. Easy for dlls. With static libs, you have to recompile your source code. So, end users could demand your object files to perform their own compilations.

FWIW, the LGPL license allows static linking with a catch. Your app must allow end users to upgrade or downgrade any LGPL content. Easy for dlls. With static libs, you have to recompile your source code. So, end users could demand your object files to perform their own compilations.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: bzip3 compression
Question, how did you compile on Windows? Using cygwin?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: bzip3 compression
I used Visual Studio 2022 and CMake.
I tweaked the settings in the generated project to compile it as a static lib and with full code optimization.
Re: bzip3 compression
I wasnt that concerned about the license. But if anyone does not want to open their source and needs the DLL, i can compile one, if they can't do it themself, no problem.Fred wrote: Tue Aug 20, 2024 6:32 pm It seems to be using the LGPL license which exclude static linking unless you open all your source. Using it as a DLL is fine though.