I wrote my own high speed compression format: https://github.com/cvghivebrain/HiveRLE Compression ratios aren't great, but they generally seem to be slightly better than SNKRLE. For data with lots of repeating bytes it'll actually compress better than Kosinski. I'm using it to compress level layouts. The HiveDec (to RAM) subroutine can be found in the asm folder. Decompressing to VRAM is untested and probably needs rewriting.
Even though I decided that game editing is not for me (well, sorta), I'm always amazed with this forum and their many new compression methods. Do you have some comparission examples vs Kosinski, Comper, the improved Kosinski and Twizzler? It could help people on making a decision on where to pick which.
I also happen to have written a program for doing just that: https://github.com/cvghivebrain/CmpCompare Code (Text): GHZ main level graphics: Uncompressed 14752 compcmp.exe 6648 45% comperx.exe 6648 45% enicmp.exe 12654 86% HiveRLE.exe 13536 92% kosinski_compress.exe 4864 33% nemcmp.exe 5615 38% snkcmp.exe 15392 104% kosplus.exe 4632 31% Sonic on the title screen: Uncompressed 16800 compcmp.exe 10510 63% comperx.exe 10510 63% enicmp.exe 12716 76% HiveRLE.exe 13533 81% kosinski_compress.exe 7424 44% nemcmp.exe 6518 39% snkcmp.exe 13886 83% kosplus.exe 7024 42% GHZ 256x256 mappings: Uncompressed 32256 compcmp.exe 11384 35% comperx.exe 11384 35% enicmp.exe 14702 46% HiveRLE.exe 27161 84% kosinski_compress.exe 8336 26% nemcmp.exe 17040 53% snkcmp.exe 27072 84% kosplus.exe 7710 24% GHZ1 level layout: Uncompressed 1024 compcmp.exe 114 11% comperx.exe 114 11% enicmp.exe 112 11% HiveRLE.exe 108 11% kosinski_compress.exe 128 12% nemcmp.exe 170 17% snkcmp.exe 110 11% kosplus.exe 110 11% A file containing the same byte repeated: Uncompressed 512 compcmp.exe 8 2% comperx.exe 8 2% enicmp.exe 20 4% HiveRLE.exe 9 2% kosinski_compress.exe 16 3% nemcmp.exe 22 4% snkcmp.exe 8 2% kosplus.exe 12 2% A file containing random bytes: Uncompressed 512 compcmp.exe 548 107% comperx.exe 548 107% enicmp.exe 532 104% HiveRLE.exe 518 101% kosinski_compress.exe 592 116% nemcmp.exe 569 111% snkcmp.exe 514 100% kosplus.exe 578 113% Twizzler isn't a normal command line program so it won't work with cmpcompare.
I forgot you have an app to automate those comparisons, lol. I'll still share the results of my manual comparison, since one of the files I tested is quite massive. I used ARZ 1's level layout, OOZ's 16x16 maps (both from Sonic 2), the animated menu background maps from Sonic 2, and the PPZ 1 Present 256x256 maps from Sonic CD. Sizes are taken from the macOS file info dialogue. (And for the record, Twizzler does seem to work from the command line, at least in PowerShell, although it creates a copy of the input file with a .bin extension if it's invoked that way.) ARZ 1 Layout: Uncompressed: 4096 bytes SNKRLE: 1668 bytes HiveRLE: 1626 bytes Enigma: 1562 bytes Saxman: 1242 bytes Comper and ComperX: 1138 bytes Kosinski: 930 bytes Twizzler: 900 bytes OOZ 16x16: HiveRLE: 5648 bytes SNKRLE: 5610 bytes Uncompressed: 5600 bytes Comper and ComperX: 4648 bytes Enigma: 4132 bytes Saxman: 4102 bytes Kosinski: 3686 bytes Twizzler: 3653 bytes Sonic and Miles Animated Menu Background Map: HiveRLE & SNKRLE: 2242 bytes Uncompressed: 2240 bytes Enigma: 432 bytes Saxman: 294 bytes Kosinski: 782 bytes Twizzler: 53 bytes Comper and ComperX: 50 bytes PPZ 1 Present 256x256 Maps: Uncompressed: 61952 bytes HiveRLE: 50078 bytes SNKRLE: 49860 bytes Enigma: 32456 bytes Comperx: 25562 bytes Comper: 25560 bytes Saxman: 20964 bytes Kosinski: 18074 bytes Twizzler: 16721 bytes
Would be nice if all of them are referenced somewhere with download links / code samples and these comparisons with CmpCompare. A Wiki SCHG page maybe?
You could implement support for this directly in SonLVL via a custom layout format class. This won't help if you want to use it for other things however. Perhaps someday compression types will be made extensible.