Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Sepa ! (Registered 2024-05-13) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > On the relative pros and cons of various RLE schemes
2024-04-21 17:12
ChristopherJam

Registered: Aug 2004
Posts: 1381
On the relative pros and cons of various RLE schemes

So over in Native crunch/decrunch code. I just suggested encoding
abbcdddeffffg as
abb{0}cdd{1}eff{2}g

Raistlin kindly liked the idea, Krill quite sensibly didn't want us to hijack the post and suggested a new post for the new topic. so... Have at it!
 
... 26 posts hidden. Click here to view all posts....
 
2024-04-23 02:08
chatGPZ

Registered: Dec 2001
Posts: 11137
Quote:
For a typical C64 program (demo?) there would be longish runs of empty space, interweaved with longish runs of code and data.

Thats why people used "linkers" before packing :) But even if not so, the difference shouldn't be more than a couple bytes on a typical program - and those bytes would form a nice sequence that can be crunched later.
2024-04-23 07:18
Fungus

Registered: Sep 2002
Posts: 626
Probably the most interesting Super-Zipper V8
2024-04-23 08:04
WVL

Registered: Mar 2002
Posts: 886
Quote: Quoting Raistlin
Isn’t it more common to use a bit to define “constant or not”?

$00-7F .. count of non-repeats ($01-$80)
$80-FF .. count of repeats ($04-$83)
Do you have any other examples of packers implementing this? I haven't seen that many.

I think the reason it's uncommon (on the C64) because it doesn't pack as well, and size was probably the main driver for the development of packers/crunchers. Decompression speed came much later.


Here is an example : https://csdb.dk/release/?id=34685.
2024-04-23 08:49
JackAsser

Registered: Jun 2002
Posts: 1990
Quote: Quoting JackAsser
Like Dinosours?
Dinasours? Which magical infinite cruncher are you referring to? =)


Check any Dinosours release and you'll get the point. :D
2024-04-23 09:34
Bitbreaker

Registered: Oct 2002
Posts: 501
Quoting Krill

RLE used to be LZ-crunched anyways, so RLE compression ratio wasn't much of a concern.


What is kind of hard to understand, as LZ includes RLE by design (match with offset 1)
2024-04-23 09:34
Krill

Registered: Apr 2002
Posts: 2854
Quoting JackAsser
Check any Dinosours release and you'll get the point. :D
I was aware that Dinasours pack everything 10 times for comedic effect,
but i thought maybe they've released the Airwolf Fixer of crunchers or something and i've missed that. :)
2024-04-23 09:37
Krill

Registered: Apr 2002
Posts: 2854
Quoting Bitbreaker
Quoting Krill

RLE used to be LZ-crunched anyways, so RLE compression ratio wasn't much of a concern.
What is kind of hard to understand, as LZ includes RLE by design (match with offset 1)
Native LZ crunchers used to require quite a bit of working memory, so the maximum size of input programs was often smaller than entirely uncompressed programs.
Thus RLE first, then LZ. Also this two-pass approach can make for better overall compression ratio.
2024-04-23 09:54
Jetboy

Registered: Jul 2006
Posts: 225
Quoting Krill
Thus RLE first, then LZ. Also this two-pass approach can make for better overall compression ratio.


Puls LZ ones were rather slow, so prepacking with RLE first could save substantial amounts of time. As shorter file to pack tends to pack quicker.
2024-04-23 10:06
enthusi

Registered: May 2004
Posts: 675
Just to add an alternative which is a bit special but cute:
Maniac Mansion and ZMK use some RLE depacker that resides in ZP and encodes most-common bytes, which I felt works rather well for graphics. I wrote something about that here:
https://www.pagetable.com/?p=603

A byte of < $40 = count of raw bytes following
$3f to < $80 represents the length of the run of the byte to follow (+$3f of course).
$7f to < $a0 is the number of runs of most common byte 1,
$9f to < $c0 and $bf to <$e0 and $df-$ff for common byte 2, 3 and 4 respectively.
2024-04-23 15:21
ChristopherJam

Registered: Aug 2004
Posts: 1381
ooh, I like that one enthusi.

Really interesting the historical divide between packers and crunchers, especially the way intros tended to be displayed between one and the other. It does indeed reduce the impact on runlength limits considerably. Not sure why I ever bothered trying to improve the ratio of my higher ratio crunchers for empty spaces now :P
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mr. SID
Case/Padua
CA$H/TRiAD
Alakran_64
bexxx
bepp/ΤRIΛD
Perff/No Name
VIC/Camelot
Skate/Plush
tubesockor
Krill/Plush
serato/Finnish Gold
aegis/ascraeus/r3turn
Guests online: 151
Top Demos
1 Next Level  (9.8)
2 13:37  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Party Elk 2  (9.7)
2 It's More Fun to Com..  (9.6)
3 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.049 sec.