Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: torbenm@app-4.diku.dk (Torben Ægidius Mogensen)
Subject: Re: The Helsinki Code, Part 3
Date: 19 Dec 2005 10:54:31 +0100	[thread overview]
Message-ID: <7z3bkp1kfc.fsf@app-4.diku.dk> (raw)
In-Reply-To: 0Bmpf.169029$qk4.132225@bgtnsc05-news.ops.worldnet.att.net

"James Giles" <jamesgiles@worldnet.att.net> writes:

> Gib Bogle wrote:
> > Soren Kuula wrote:
> ...
> >> If it's the Bible, output a 0. Stop.
> >>
> >> If not, output a 1, followed by the input (possibly compressed in
> >> some other way, doesn't matter).
> >
> > OK, we have compression.  Now decompression?
> 
> I disagree.  We have yet to see the compression algorithm.
> There must be some means of deciding whether the input
> is the Bible or some other text.  I can't offhand see a way
> short of having a reference copy of the Bible built into the
> compression program (or available to it).
> 
> As for decompression, I again see no possibility other than
> to have a reference copy of the Bible available to the
> decompression program.  It is left as an exercise for the
> reader to determine how to distribute these reference
> copies to insure that the compression and decompression
> programs use the same one.
> 
> So, I ask again: in what way does this constitute a compression
> if copies of the text are required independently of the "compressed"
> data.  It seems to me to require *more* space: the space required
> to store the reference copy, the space taken up by the compression
> and decompression programs, and the bit taken up by the so-called
> "compressed" text.

Some text compression algorithms do word-by-word compression using a
dictionary rather than letter-by-letter compression (though they fall
back on that when they encounter words not in the dictionary).  Using
a corpus text isn't that much different.  Basically, given a large
text, you can compress it in the following way:

Given the text to be compressed, find the longest prefix which occurs
in the bible.  Then output the position of that prefix in the bible
and the length of it.  Given that the input text is the bible, the
position is 0 and the length is the length of the bible.  It isn't
hard to make the compression algorithm such that it special cases on
this situation and outputs "@".

So, it isn't unreasonable to assume a compression program that can
compress the bible to one byte.  It might not do much for other texts,
though.  But that is true of all compresson programs: You can't
compress all strings (the average size of compressed strings is at
least as long as the average size of the original strings), so your
algorithms must assume some similarity in the texts it needs to
compress -- either similarity to a corpus of texts or self-similarity.

Dictionary-based compression uses the first of these, as does
Huffman-encoding using a fixed table, while LZW compression and
adaptive Huffman-encoding use the latter.

        Torben


  parent reply	other threads:[~2005-12-19  9:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-18 13:25 The Helsinki Code, Part 3 dunric
2005-12-18 19:31 ` Soren Kuula
2005-12-18 19:42   ` James Giles
2005-12-18 20:07     ` Soren Kuula
2005-12-18 23:26       ` Gib Bogle
2005-12-18 23:50         ` James Giles
2005-12-19  1:50           ` Gib Bogle
2005-12-19  2:11           ` Wayne Throop
2005-12-19  3:29             ` James Giles
2005-12-19 21:14             ` Alan Adams
2005-12-19  3:15           ` John Harper
2005-12-19  3:32             ` James Giles
2005-12-19  4:35             ` Joe Pfeiffer
2005-12-19 21:21             ` sdf
2005-12-19 22:33               ` John Harper
2005-12-19  9:54           ` Torben Ægidius Mogensen [this message]
2006-01-01 17:38           ` Soren Kuula
2005-12-19 18:19         ` John Schilling
2005-12-19 21:50 ` markwh04
2005-12-19 22:33   ` Default User
2005-12-20  0:09     ` dunric
2005-12-20  0:17       ` Default User
2005-12-20  1:12       ` Richard Tobin
2005-12-20 16:58         ` Default User
2005-12-20  7:43       ` Robert Baer
2005-12-20 15:39       ` Ross Presser
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox