News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_roudoudou

ZX7 cruncher (from Spectrum world)

Started by roudoudou, 09:05, 04 May 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

roudoudou

Hi, searching some crunching info around the web, i saw this cruncher coming from spectrum world, written by Einar Saukas (Br)


To sum up, the crunching performance are between Exomzier and LZ4, as the decrunching time.


My test file, a real bitmap screen (a conversion of a motocross picture), (interrupt disabled  :D )


i used the docent version of lz4 decruncher
i used the turbo version of zx7 decruncher (not the mega)
i used the optimized version (and re-optimized by me) version of exomizer decruncher


type   size    time   ldir factor
---------------------------------
RAW   16384    0.09s        x 1.0 (reference)
LZ4   11926    0.14s        x 1.5
ZX7   10484    0.43s        x 4.3
EXO    9448    1.42s       x 14.4


download found here: http://www.worldofspectrum.org/infoseekid.cgi?id=0027996


and in attachment
My pronouns are RASM and ACE

Sykobee (Briggsy)

Useful, so where speed matters (decompression from extension RAM) most, use LZ4, where size matters (tape/disk loading, crt compression) use EXO, and in the rare case of speed and size mattering, use the ZX7 cruncher.


Can you try it on a non-image by the way? It may be that code compresses differently. Also sometimes with less complex images a simple fast RLE can get fairly decent compression.

roudoudou




Sure, there is the wellknown file test BOULDERD.BIN (Boulder Dash executable) of 28837 bytes


ZX7 is very competitive in this case, cause exomizer routine is bigger, slower and need a buffer! For the small gain, it do not worth it!


Just do the test each time you have to crunch


LZ4 -> 13987
ZX7 -> 11651
EXO -> 11026
My pronouns are RASM and ACE

Arnaud

Bad luck there's not a C decompressor included, i can't use it as cross compressor (Windows / CPC).

roudoudou

My pronouns are RASM and ACE

Arnaud


reidrac

Quote from: Arnaud on 07:39, 08 May 17
Bad luck there's not a C decompressor included, i can't use it as cross compressor (Windows / CPC).

For LZ4 should be quite easy... I'm using it for my current C64 project and I compress with C in Linux and decompress with 6502 assembler.

Not sure about the others, but if they're documented, all is possible.
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Alcoholics Anonymous

Quote from: Arnaud on 07:39, 08 May 17
Bad luck there's not a C decompressor included, i can't use it as cross compressor (Windows / CPC).

You need a newer package:
https://www.dropbox.com/sh/bgtoq6tdwropzzr/AABLP1X6NU9PWBxhgDHHV9y-a/ZX7?dl=0

There is a pc decompressor in there.

zx7 has a number of advantages:  small size, no ram requirement, can decompress backwards and is able to prime its dictionary with a prefix to get better compression.


Arnaud

Here a version of ZX7 for cpctelera and an example. It was really easy to adapt.


reidrac

Quote from: Arnaud on 08:25, 14 May 17
Here a version of ZX7 for cpctelera and an example. It was really easy to adapt.

You really should comply with the license. Einar is very kind sharing is work with all of us and it is really easy to play fair with him doing things legally.

Sorry to be that guy.
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Arnaud

#12
Quote from: reidrac on 09:02, 14 May 17
You really should comply with the license. Einar is very kind sharing is work with all of us and it is really easy to play fair with him doing things legally.

Sorry to be that guy.

I'm totaly agree with you, but what is missing in my release ? The name of the creators is in the asm file, and the ZX7 name is kept.

edit : Maybe i should add in comment i have modified the asm file for the adaptation for cpctelera

Here the license :
=======
LICENSE
=======

The optimal C compressor is available under the "BSD-3" license. In practice,
this is relevant only if you want to modify its source code and/or incorporate
the compressor within your own products. Otherwise, if you just execute it to
compress files, you can simply ignore these conditions.

The Z80 assembly decompressors can be used freely within your own ZX-Spectrum
programs (or any other Z80 platform), even for commercial releases. The only
condition is that you must indicate somehow in your documentation that you have
used "ZX7".

reidrac

Quote from: Arnaud on 09:12, 14 May 17
I'm totaly agree with you, but what is missing in my release ? The name of the creators is in the asm file, and the ZX7 name is kept.

edit : Maybe i should add in comment i have modified the asm file for the adaptation for cpctelera

Here the license :
=======
LICENSE
=======

The optimal C compressor is available under the "BSD-3" license. In practice,
this is relevant only if you want to modify its source code and/or incorporate
the compressor within your own products. Otherwise, if you just execute it to
compress files, you can simply ignore these conditions.

The Z80 assembly decompressors can be used freely within your own ZX-Spectrum
programs (or any other Z80 platform), even for commercial releases. The only
condition is that you must indicate somehow in your documentation that you have
used "ZX7".

You didn't include that information in the two ZIP files you uploaded.

I didn't get the impression you rewrote the code so is not based on Einar's code.
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Arnaud

Quote from: reidrac on 11:34, 14 May 17
I didn't get the impression you rewrote the code so is not based on Einar's code.

I haven't rewrite the code, i just made some minor modifications to make Einar's code compatible with cpctelera and easily used with it.

I send a message to @Urusergi, cowritter of ZX7 decoder, to be sure i can distribute this code (but i think all is ok)

Arnaud

#15
Hello,
i'm looking for the C version of ZX7 Backward decoder in order to have WinCpcTelera compatible with the version 1.5.0 of CPCTelera which includes zx7 compressor.

I haven't found in the following repositories :I also tried to adapt the ZX7 "normal" but my code doesn't work.

Thanks for help.

roudoudou

I thought the backward version was named Saukav
My pronouns are RASM and ACE

Arnaud

#17
Quote from: roudoudou on 21:03, 29 December 18
I thought the backward version was named Saukav
You are right, but same problem, there's not C decoder.

antoniovillena

Quote from: Arnaud on 07:54, 30 December 18
You are right, but same problem, there's not C decoder.


Hi. I have created a decoder here:
https://github.com/antoniovillena/zx7b/blob/master/dzx7b.c

Also published 8086 real mode decoder (.com file) used in bacteria.
https://github.com/antoniovillena/zx7b/blob/master/bacteria_dzx7b.asm


saukav is a generalization algorithm. It has 36 different compression codings and zx7b is only one of them). But there is no C decoder for it.


Arnaud

Thanks a lot @antoniovillena to make it so quickly.

Quote from: antoniovillena on 11:56, 02 January 19
saukav is a generalization algorithm. It has 36 different compression codings and zx7b is only one of them). But there is no C decoder for it.
Ok, i think dzx7b is only what i need.

Powered by SMFPacks Menu Editor Mod