Open zx70 opened 11 months ago
Here's the smallest application of deflate I could think at, I ripped off the CRC check at all because the data will be extracted on the fly and displayed on the screen. https://github.com/z88dk/z88dk-ext/blob/master/os-related/CPM/zcat.asm
The 8080 retrofit code is correct but not sufficient to allow a backport, I'm using this stuff to test the z88dk tools.
Running deflate on a self contained block including the data to be unzipped and disabling the output i could gather the following results from z88dk-ticks.
Old CRC32 algorithm: 43320067 ticks CRC32 table based: 27897531 ticks No CRC32 check at all: 22760196 ticks
So, you have all my admiration for making the CRC32 check almost CPU transparent !
For the record, the manual fixes to get a 8080 retrofit extended already the CPU time to 28331966 ticks (keeping CRC32 disabled).
Providing Deflate is a wonderful achievement. I'd like to point out that a GUNZIP tool is just right behind the corner, probably a CRC16 routine would suffice to provide a nice text deflater.
I could print out the text from a gzipped file with the following mockup, it stops with a CRC error only after having printed out the whole thing:
This is also a valuable concept to exclude the file related BDOS calls and work on a fixed memory image to tune the decompression algorithm, a cut-down version allows z88dk-ticks to work properly and compute the overall CPU usage.