🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56614

Re: [yEnc] some newbie questions

#56614
From: Liyang Hu
Date: Mon, 18 Feb 2002 10:48
57 lines
3685 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
> [Liyang Hu]
>> Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
>> > Agreed, but the current = escape is wasteful.  Only seven of
>> > 256 possible codes are used/needed.
>> Seven? Where did you get that number from?
> NUL, CR, LF and their reflexive value, as well as =.

YM `used/unavailable' then. ^_- (Okay, I realise English[0] isn't
everyone's first language here. 'scuse the misunderstranding. ^_^;;)

>> > The remainder could be used for some common predefined byte
>> > sequences.
>> Care to list some `common' byte sequences?
> I'm sure there are many people with a large corpus on their
> harddisk which they can use for analysis.  Worst case, input is
> uniform.  This means that the chosen scheme will save 249/65536 ~=
> 0.4% on average. However, if you consider that a few octets need
> to escaped and thus double their transfer requirement, choosing
> sequences with these will improve the ratio considerably.

s/considerably/barely/

You're massively increasing the complexity (think of the table of
`common' sequences) of the algorithm, for very little gain.

What I've been saying all along: why not let the compression
algorithm do the analysis on a case-by-case basis, instead of
assuming things about your input which may or may not be true?

(The other [even better] solution for representing 256 different
symbols with only 251 available ones is to use arithemtic coding.
Again, this is a case of a [even more] massive increase in
complexity, compared to what you would gain.)

>> To avoid the `complexity' of borrowing zlib code, the other
>> solution is to just mix (XOR or add) the input data with a
>> pseudo-random sequence. A simple random number generator (with a
>> fixed seed) is sufficient to ensure that statistically, we've
>> little or no skew in the character distribution.
> I'm unconvinced this is true.

What exactly are you unconvinced about? The simplicity of a pseudo-
random number generator, or the fact that it will make the character
distribution uniform? I'll try my best to convince you otherwise.
^_-

Either way, this is only a suggestion if the rest of the developers
out there are unwilling to use a simple, freely available library.

/Liyang
[0] Technically, it isn't mine either. <g>
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| > Ever heard of .cshrc?                                                |
| That's a city in Bosnia. Right?                                        |
Technical Details
Message-ID: <a4qm66$sol$1@pegasus.csx.cam.ac.uk>
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!sn-xit-02!supernews.com!news-x2.support.nl!news.csl-gmbh.net!newsfeed.r-kom.de!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
References: <3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <3c702e8c.7007252@news> <a4pknt$4pg$2@pegasus.csx.cam.ac.uk> <1rn0y77ebu.fsf@sex.ifi.uio.no> <a4pq59$a4e$1@pegasus.csx.cam.ac.uk> <1rofinbdp1.fsf@sex.ifi.uio.no>

Show Full Headers
Complete Article Headers
Message-ID: <a4qm66$sol$1@pegasus.csx.cam.ac.uk>
Subject: Re: [yEnc] some newbie questions
Date: Mon, 18 Feb 2002 10:48:38 +0000
From: Liyang Hu <newsgroups@nerv.cx>
References: <3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <3c702e8c.7007252@news> <a4pknt$4pg$2@pegasus.csx.cam.ac.uk> <1rn0y77ebu.fsf@sex.ifi.uio.no> <a4pq59$a4e$1@pegasus.csx.cam.ac.uk> <1rofinbdp1.fsf@sex.ifi.uio.no>
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!sn-xit-02!supernews.com!news-x2.support.nl!news.csl-gmbh.net!newsfeed.r-kom.de!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
Newsgroups: news.software.nntp
Organization: University of Cambridge, England
Lines: 56
Sender: Liyang Hu <lh259@portal.acad.cai.cam.ac.uk>
NNTP-Posting-Host: portal.acad.cai.cam.ac.uk
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.4.17-xfs+lvm10+intl (i686))