🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56953

Re: [yEnc] some newbie questions

#56953
From: Nuutti Kotivuori
Date: Wed, 27 Feb 2002 20:10
53 lines
3698 bytes
Curt Welch wrote:
> Nuutti Kotivuori <naked@iki.fi> wrote:
>> But if we, for example, use adaptive coding, the table will shape
>> itself to respect the actual distribution of bytes in the input
>> data.
> 
> No.  At least I don't see how to do that. Maybe you can teach me
> something else new?
> 
> Remeber, to use arithmetic encoding to solve the binary to base251
> translation problem, we have to use the arithmetic DEcoding
> algorithm to do our ENcoding work.  I don't see how you can use the
> skew in the binary data to any advantage when going in that
> direction.

But the thing is that we do not _need_ to use decoding to do the
algorithm work - that is only one solution. We can use a 256 character
table for the symbol table - and do our _math_ in 251 base - that is
have 251 base digits, instead of 2 base, 10 base or 16 base as
normally used. The only place where we actually need to do any maths
with these numbers is the adaptation of high and low for a symbol into
the current range. This operation can be hand coded without too much
bother. And even there it can possibly be done with just addition and
comparison, if we use a bit more advanced and approximating
implementations of arithmetic coding.

But this again is just one solution. Arithmetic encoding can be used
in a multitude of ways. Arithmetic coding is the optimal way of
representing symbols with probabilities in the least amount of digits,
just like Huffmann encoding was about the optimal way of representing
symbols with probabilities in the least amount of integral
bits. Saying that it can't be done is silly, since it's just a matter
of implementation.

> The only option I see is to simply make one pass over the data with
> any compression algorithm

> (of which adaptive coding would be a poor choice),

If we are talking about actual compression algorithms, a 0-order
adaptive arithmetic coding would be a poor choice. But adaptive coding
in itself would not. By doing 2nd and 3rd order tables with escapes
and other neat gimmics, we can actually do very good compression with
adaptive coding.

> and then use arithmetic coding to convert from binary to baseX.

But in any case, these solutions are quite elaborate compared to the
problem at hand - representing 256 base data in 251 base or whatever.

-- Naked

Technical Details
Message-ID: <87bsea3cv9.fsf@iki.fi>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.stealth.net!news.cc.tut.fi!uutiset.saunalahti.fi!localhost
References: <3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <1rr8nmjix6.fsf@fjorir.ifi.uio.no> <a4knl3$3ol$1@pegasus.csx.cam.ac.uk> <3c7a60b7.469568@news> <a5gp0f$621$1@pegasus.csx.cam.ac.uk> <20020226152108.753$EN@newsreader.com> <87it8j2vuq.fsf@iki.fi> <20020227140753.831$xF@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <87bsea3cv9.fsf@iki.fi>
Subject: Re: [yEnc] some newbie questions
Date: Wed, 27 Feb 2002 22:10:02 +0200
From: Nuutti Kotivuori <naked@iki.fi>
References: <3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <1rr8nmjix6.fsf@fjorir.ifi.uio.no> <a4knl3$3ol$1@pegasus.csx.cam.ac.uk> <3c7a60b7.469568@news> <a5gp0f$621$1@pegasus.csx.cam.ac.uk> <20020226152108.753$EN@newsreader.com> <87it8j2vuq.fsf@iki.fi> <20020227140753.831$xF@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.stealth.net!news.cc.tut.fi!uutiset.saunalahti.fi!localhost
Newsgroups: news.software.nntp
Organization: SAUNALAHDEN asiakas
Lines: 52
NNTP-Posting-Host: cs183115.pp.htv.fi
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: tron.sci.fi 1014842261 6360 213.243.183.115 (27 Feb 2002 20:37:41 GMT)
X-Complaints-To: newsmaster@saunalahti.fi
NNTP-Posting-Date: 27 Feb 2002 20:37:41 GMT
User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i386-debian-linux)
Cancel-Lock: sha1:pb3N8Krpzl75sval7m/851NCjas=