Date : Mon, 18 Sep 2006 09:22:51 +0100
From : "Steve O'Leary" <navalenigma@...>
Subject: Re: Compressed ROMFS?
--_49da7632-128d-49f5-9b1c-02cc00dcf0c1_
From: navalenigma@... bbc-micro@... Mon, 18 Sep 20
06 09:10:12 +0100Subject: RE: [BBC-Micro] Compressed ROMFS?
> From: info@...> To: bbc-micro@...> Date: Mon, 18 Sep 200
6 07:50:20 +0100> Subject: Re: [BBC-Micro] Compressed ROMFS?> > In article
<4e67ac7d89info@...>,> Sprow <info@...> wrote:> > In art
icle <20060916095434.53696.qmail@...>,> > Greg C
ook <debounce@...> wrote:> > > Did anyone ever come up with a syste
m for compressing files in ROMFS> > > images? I sketched out a dictionary
based algorithm yesterday but the> > > hard part is finding the repeating s
ubstrings.> >> > I had a quick bash this morning at Huffman coding some dat
a> >> > For tokenised BASIC you can save 21%> > For 6502 binaries you can s
ave 10%> > As a postscript to my own message, I tried some bitmapped data t
oo (very> high proportion of 0's for black) and that compressed by 61%.> >
Lastly I wrote an RLE compressor using the madness proposed in> <4e5b03df85
info@...> and that gave> For 6502 binaries you can save just 1%>
For tokenised BASIC you save -2% (ie.bigger!)> For bitmap images with h
igh black content 41%> Sprow.I'm glad you've had a go and got some figures.
I can't see LZW performing any better than Huffman on binaries and the sav
ings were not that brilliant. The thing is for the life in me I cannot actu
ally remember why I wanted to do this in the first place now. There was a r
eason to it all, perhaps images, I'm not sure. Maybe if we wrote LZW in nor
mal memory (not in a ROM) so we can use the normal full memory as workspace
and just see if it performs any better. As Greg mentioned there could be i
ssues with the limited scratchspace you have unless you alter page but we w
ouldn't want to do that. However as it's a fairly small algorythm I suppos
e it could run in sideways RAM and use what's left of it's 16K as dictionar
y space ? Limits it's usefulnes for those with SW-RAM though :( And as I've
never actually written an LZW routine, would we need to check for running
out of dictionary space ? Obviously depends on the size of file to be compr
essed, do you know what the average dictionary size is as a percentage of o
riginal file size ?
The line;
Limits it's usefulnes for those with SW-RAM though :(
should of course read;
Limits it's usefulnes for those WITHOUT SW-RAM though :(
Doh !
_________________________________________________________________
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-
4911fb2b2e6d
--_49da7632-128d-49f5-9b1c-02cc00dcf0c1_
--_49da7632-128d-49f5-9b1c-02cc00dcf0c1_--