Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Gabezcommodore ! (Registered 2025-07-24) 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: 1427
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!
 
... 38 posts hidden. Click here to view all posts....
 
2024-04-22 07:57
Krill

Registered: Apr 2002
Posts: 3106
Quoting Fungus
But you don't get accused of ripping anymore so looking at stuff is OK these days.
Ripping and looking at other people's code are different things, though. =)
2024-04-22 09:25
The Human Code Machine

Registered: Sep 2005
Posts: 114
Here's an exmaple of a byte packer using different pack codes: https://codebase64.org/doku.php?id=base:mdg_bytesmasher_0.04&s[..
2024-04-22 13:54
JackAsser

Registered: Jun 2002
Posts: 2038
Quote: That depends how expensive your encoding for a zero additional repeat counts is. But sure, every compression scheme is vulnerable to certain inputs getting bigger instead of smaller, otherwise you could just keep recrunching to get arbitrarily small outputs.

Like Dinosours?
2024-04-22 15:42
Krill

Registered: Apr 2002
Posts: 3106
Quoting JackAsser
Like Dinosours?
Dinasours? Which magical infinite cruncher are you referring to? =)
2024-04-22 15:48
chatGPZ

Registered: Dec 2001
Posts: 11540
did someone mention packers.txt yet?
2024-04-22 19:33
tlr

Registered: Sep 2003
Posts: 1822
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.
2024-04-22 20:28
Krill

Registered: Apr 2002
Posts: 3106
Quoting tlr
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.
I think it's uncommon because everybody just copied everybody else's approach. :)

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

How are you so sure this approach (generally?) packs worse than the escape-byte approach?
2024-04-22 20:41
tlr

Registered: Sep 2003
Posts: 1822
Quoting Krill
RLE used to be LZ-crunched anyways, so RLE compression ratio wasn't much of a concern.
Initially RLE seemed to have been used by itself.

Quoting Krill
How are you so sure this approach (generally?) packs worse than the escape-byte approach?
I'm thinking because only 128-ish runs are allowed + only 128-ish literal blocks. For a typical C64 program (demo?) there would be longish runs of empty space, interweaved with longish runs of code and data.

But maybe I'm assuming too much? Would be interesting to seem some practical measurements.
2024-04-23 02:08
chatGPZ

Registered: Dec 2001
Posts: 11540
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: 756
Probably the most interesting Super-Zipper V8
Previous - 1 | 2 | 3 | 4 | 5 | 6 - 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
E$G/HF ⭐ 7
REBEL 1/HF
Andy/AEG
Didi/Laxity
Sokrates
d'Avid
hedning/G★P
The Syndrom/TIA/Pret..
Oxbow/Xenon
Smasher/F4CG
Clayboy
JCH/Vibrants
TheRealWanderer
Menace/Spaceballs
leonofsgr/Singular C..
Kimono
Guests online: 51
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Harminc  (9.7)
4 Codeboys & Endians  (9.7)
5 Mojo  (9.7)
6 Coma Light 13  (9.6)
7 Edge of Disgrace  (9.6)
8 Comaland 100%  (9.6)
9 Signal Carnival  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Morphing Starball  (9.9)
2 Nine  (9.8)
3 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.5)
7 Scan and Spin  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Grey  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Oxyron  (9.3)
5 Artline Designs  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Shine  (9.5)
4 Mermaid  (9.5)
5 Pal  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.05 sec.