This shows you the differences between two versions of the page.
— | base:dictionary_compression [2022-08-14 12:10] (current) – created martin_piper | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Full source and example code is in here: https:// | ||
+ | |||
+ | |||
+ | A variant of literal/ | ||
+ | |||
+ | The build for this tool is also a good demonstration on how to unit test 6502 code along with java code. | ||
+ | |||
+ | Command line parameters: | ||
+ | |||
+ | < | ||
+ | | ||
+ | |||
+ | |||
+ | Example usage: | ||
+ | |||
+ | java -jar target\DictionaryCompression-1.0-SNAPSHOT-jar-with-dependencies.jar 1024 target/ | ||
+ | |||
+ | Which equals 11,745 bytes | ||
+ | |||
+ | Compare this with the result of using LZMPi to compress each file individually: | ||
+ | |||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | ..\bin\LZMPi.exe -c " | ||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | ..\bin\LZMPi.exe -c TestData/ | ||
+ | dir target\*.cmp2 | ||
+ | |||
+ | Which equals 13,088 bytes | ||
+ | |||
+ | The dictionary compression is 1,343 bytes smaller. | ||
+ | |||
+ | |||
+ | |||
+ | === Demo === | ||
+ | |||
+ | |||
+ | |||
+ | To assemble the demo, first run the command line about in " | ||
+ | |||
+ | 6502 asm source to decompression is in: asm\DictionaryDecompression.a | ||
+ | |||
+ | Demo source (ACME format) is in: asm\Demo.a | ||
+ | |||
+ | It can be assembled using: BuildIt.bat | ||
+ | |||
+ | Assembled demo prg file is in: target\Demo.prg | ||
+ | |||
+ | The dictionary is at $c000 so if you're using a memory viewer it shows when it is read. The compressed data is much lower in memory at around $a50. The decompression address is $8000 | ||