Author Topic: ZX7 cruncher (from Spectrum world)  (Read 1263 times)

0 Members and 1 Guest are viewing this topic.

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 493
  • Country: fr
    • urban exploration
  • Liked: 549
ZX7 cruncher (from Spectrum world)
« on: 11:05, 04 May 17 »
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
use RASM, the best assembler ever made :p

I will survive

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 653
  • Country: gb
  • Liked: 214
Re: ZX7 cruncher (from Spectrum world)
« Reply #1 on: 11:22, 04 May 17 »
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.

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 493
  • Country: fr
    • urban exploration
  • Liked: 549
Re: ZX7 cruncher (from Spectrum world)
« Reply #2 on: 11:43, 04 May 17 »



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
use RASM, the best assembler ever made :p

I will survive

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262
Re: ZX7 cruncher (from Spectrum world)
« Reply #3 on: 09:39, 08 May 17 »
Bad luck there's not a C decompressor included, i can't use it as cross compressor (Windows / CPC).

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 493
  • Country: fr
    • urban exploration
  • Liked: 549
Re: ZX7 cruncher (from Spectrum world)
« Reply #4 on: 14:14, 08 May 17 »
I may write one ;)
use RASM, the best assembler ever made :p

I will survive

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262
Re: ZX7 cruncher (from Spectrum world)
« Reply #5 on: 14:26, 08 May 17 »
I may write one ;)

I was secretly hoping  ;D

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 579
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 952
Re: ZX7 cruncher (from Spectrum world)
« Reply #6 on: 15:35, 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 and Magica for the CPC.

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 884
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 597
Re: ZX7 cruncher (from Spectrum world)
« Reply #7 on: 18:40, 08 May 17 »
I may write one ;)
Well done, Roud !
_____________________

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


Amstrad Plus French Forum

All friends are welcomed !

Offline Alcoholics Anonymous

  • CPC664
  • ***
  • Posts: 51
  • Country: ca
  • Liked: 44
Re: ZX7 cruncher (from Spectrum world)
« Reply #8 on: 00:27, 13 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.

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262
Re: ZX7 cruncher (from Spectrum world)
« Reply #10 on: 10:25, 14 May 17 »
Here a version of ZX7 for cpctelera and an example. It was really easy to adapt.


Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 579
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 952
Re: ZX7 cruncher (from Spectrum world)
« Reply #11 on: 11:02, 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 and Magica for the CPC.

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262
Re: ZX7 cruncher (from Spectrum world)
« Reply #12 on: 11:12, 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".
« Last Edit: 11:21, 14 May 17 by Arnaud »

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 579
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 952
Re: ZX7 cruncher (from Spectrum world)
« Reply #13 on: 13:34, 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 and Magica for the CPC.

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 379
  • Country: fr
  • Liked: 262
Re: ZX7 cruncher (from Spectrum world)
« Reply #14 on: 14:04, 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)