<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 18 Sep 2006 09:10:12 +0100
From   : "Steve O'Leary" <navalenigma@...>
Subject: Re: Compressed ROMFS?

--_71a615cc-da2b-4de9-ad9f-1186f8e4abd1_



> 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 a
ny better than Huffman on binaries and the savings were not that brilliant.
 The thing is for the life in me I cannot actually remember why I wanted to
 do this in the first place now. There was a reason to it all, perhaps imag
es, I'm not sure. Maybe if we wrote LZW in normal 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 issues with the limited scratc
hspace you have unless you alter page but we wouldn't want to do that. 
 
However as it's a fairly small algorythm I suppose it could run in sideways
 RAM and use what's left of it's 16K as dictionary space ? Limits it's usef
ulnes 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 compressed, do you know what th
e average dictionary size is as a percentage of original file size ?
_________________________________________________________________
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-
4911fb2b2e6d

--_71a615cc-da2b-4de9-ad9f-1186f8e4abd1_


--_71a615cc-da2b-4de9-ad9f-1186f8e4abd1_--
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>