ZX0 data compressor

Page 2/3
1 | | 3

By Metalion

Paragon (1442)

Metalion's picture

20-09-2021, 17:24

I just did a comparison on a screen2 pattern and color files:

patterns: 664 bytes
	rle	580 bytes
	pletter	355 bytes
	zx0	342 bytes

colors: 664 bytes
	rle	579 bytes
	pletter	294 bytes
	zx0	279 bytes

I have not yet tried the decompression speed on MSX.

By santiontanon

Paragon (1481)

santiontanon's picture

20-09-2021, 17:36

nice! Depending on the type of file you will see more or less difference from pletter to zx0, I've seen about a 5% - 10% difference more or less (some times more).

By theNestruo

Champion (314)

theNestruo's picture

20-09-2021, 17:43

A comparison (a little bit outdated: ZX0 has a new version, and there is no mention of ZX1 and ZX2): https://www.cpcwiki.eu/forum/programming/new-cruncher-zx0/ms...

By jltursan

Prophet (2537)

jltursan's picture

20-09-2021, 18:53

As per the graph in the thread above, ZX0 outperforms pletter's unpacking speed by about 20%

By Metalion

Paragon (1442)

Metalion's picture

21-09-2021, 08:55

jltursan wrote:

As per the graph in the thread above, ZX0 outperforms pletter's unpacking speed by about 20%

Beware that there's 4 different versions of the ZX0 unpacking routine:
. Standard : 68 bytes
. Turbo : 126 bytes, about 21% faster
. Fast : 187 bytes, about 25% faster
. Mega : 673 bytes, about 28% faster

The graph seems to show that the "Standard" one is a little bit slower than Pletter5d.
All other unpacking routines are indeed faster.

By santiontanon

Paragon (1481)

santiontanon's picture

21-09-2021, 16:19

Oh, I think I overlooked this, and I am using the "68 bytes" routine in my projects, hence seeing it a bit slower than Pletter. Good to know this! Thanks for all the links guys!

By sd_snatcher

Prophet (3470)

sd_snatcher's picture

21-09-2021, 16:57

The only sad aspect is that most of these decompressors have no option to decompress directly to the VRAM.

By Manuel

Ascended (18125)

Manuel's picture

21-09-2021, 21:26

I'd say that ideally, the decompression speed is maximized, or the size of the data and/or decompressor is minimized, or some good combination of that suitable to the project. Given "infinite" calculation power of a modern computer to create the compressed data that is most suited for the targeted purpose, how far could one go?

By jltursan

Prophet (2537)

jltursan's picture

21-09-2021, 21:34

Quote:

The graph seems to show that the "Standard" one is a little bit slower than Pletter5d.

Just thinking in "Turbo" or "Fast" routines, they're great just using some more extra bytes; but yes, as sd_snatcher says, no direct VRAM unpacking is limiting a bit the decompression routines.

By theNestruo

Champion (314)

theNestruo's picture

22-09-2021, 23:09

sd_snatcher wrote:

The only sad aspect is that most of these decompressors have no option to decompress directly to the VRAM.

jltursan wrote:

(...) but yes, as sd_snatcher says, no direct VRAM unpacking is limiting a bit the decompression routines.

I think it is the opposite: unpacking to VRAM limits the possibility of copying from offset (previously unpacked data) in an efficient way... and that excludes the most interesting compressors :/

Page 2/3
1 | | 3