A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / Need a decent cruncher with c source

 

Author Message
xxxxx
Member
#1 - Posted: 29 Nov 2012 17:55
Reply Quote
Hi guys,

I'm looking for a cruncher for my current production. I have a few requirements, but maybe you know of code that already does this

1. needs to have c source for the cruncher, and it needs to be endian neutral (because I have my tool chain on PC)
2. needs to have asm source for decruncher, needs to run on 68000 CPUs
3. needs to just take raw data, it should not deal with amiga hunks (I have my own amiga hunk decoder, and I need this for both code and data)
4. needs to perform in-place decrunching (so if I have a 1000 byte file that is packed down to 400 bytes, I can allocate a buffer of maybe 1008 bytes and load the packed file in at the offset 608 and decrunch to offset 0-1000), or stream decrunching (every time I load 512 bytes, I can decrunch a little bit more into the final buffer, I don't need the full packed buffer)
5. unpacking speed is more important than squeezing every single byte out of it. it's just needs to get "pretty good" packing ratios.

Cheers
Blueberry
Member
#2 - Posted: 30 Nov 2012 10:28 - Edited
Reply Quote
You could try zlib compression, for example using the miniz implementation. The miniz decompressor (tinfl.c) seems to be sufficiently self-contained that it should not be a problem to compile it for 68000. As for in-place decompression, I am not sure, but my guess is that it will not be a problem if you give it some margin.
xxxxx
Member
#3 - Posted: 1 Dec 2012 05:00
Reply Quote
thanks for the suggestion. I have used zlib before but didn't know about miniz.
dodke
Member
#4 - Posted: 1 Dec 2012 10:44
Reply Quote
I've used the lz77 compressor here
http://dalton.modermodemet.se/?dir=src/crunch

It really doesn't have the best compression ratio but it works and the decompressor is easy to modify to your own needs because it's almost as simple as copying memory :).
z5_
Member
#5 - Posted: 7 Dec 2012 18:11
Reply Quote
xxxxxx, just curious, is your project demo related?
xxxxx
Member
#6 - Posted: 9 Dec 2012 04:04
Reply Quote
yeah, it's a demo. it's still a long shot that I will finish it, but I'm having fun on the journey.

I think I'm going for the lz77 compressor, but I may fix it so it will support in-place decompression (currently that's not working with all files)

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0