Need a Faster Compressor

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 17 01:38:19 PDT 2016


On Tuesday, 24 May 2016 at 20:25:18 UTC, Era Scarecrow wrote:
>  64 bytes? Hmm I had the impression it was going to be far 
> larger...

  Well it's been a while since I last touched this topic (or code) 
so I'll post it, but there's 3 formulas written.


0) compress.c - control code, we are comparing against
1) compress_reduced.c, a drop-in replacement. Shouldn't be any 
issue with using, although doesn't compress or as fast as it 
could be.
2) compress_min.d, might need some API reworking, but other than 
that it is real fast by my tests.
3) compress_big.d, much more memory usage, but compresses similar 
to compress_min, but does much better compression on large 
objects that are more normal text like source code.

  For sheer speed compress_min is the best choice. although it may 
not compress as well.

Note: wideint.d is referenced for a compress test, you can change 
the script to use something else, or copy something and just fill 
the file in.

https://github.com/rtcvb32/Side-Projects/commit/452532904ca2d43af09bced31854eadc0395f406


More information about the Digitalmars-d mailing list