🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
110 messages
110 total messages Page 1 of 3 Started by Liyang Hu Sat, 16 Feb 2002 01:20
Page 1 of 3 • 110 total messages
Re: [yEnc] some newbie questions
#56534
Author: Liyang Hu
Date: Sat, 16 Feb 2002 01:20
74 lines
3906 bytes
=-lordsnow-= <lordsnow@home.nl> wrote:
> Let me start by apologising beforehand if they were already
> answered, I came to this discussion late.

I don't think there was any serious discussion of late ... none that
I can see anyway.

> I have read the yEnc draft at www.yenc.org and am left with the
> following questions/comments:

>> A lot of binaries are using a lot of NULL characters
> Is this true? Much more so than other byte values?

This is a total misconception. I don't think the draft was very well
thought through.

There are much better ways of removing skew from the symbol
distribution -- eg. XORing the data bytes with a pseudo-random
sequence, or better, compress it.

Adding 42 just shifts the skew elsewhere.

>>  so the entire character table is rotated by 42:
> Why 42?

Must have been a fan of ``The Hitchiker's Guide to the Galaxy''. Not
the best of reasons ...

>> If one of the critical chars encounters then write '=' as escape
>> character to the output stream followed by the critical+64.
> Again.. why 64 instead of some other value?

No idea. To map Ctrl-letter to `letter'? Again, this choice seems
rather arbitrary.

>> It is difficlut to calculate the number of lines for a message
>> [so] the "Lines:" header for yEncoded messages is still
>> calculated as if UUencode would be used ... the number of lines
>> is still calculated as:  "binary size / 45".
> If you're using 255 byte lenght lines, then wouldn't it simply be
> "binary size / 255" + a few preface text lines and management
> lines?

Again, this difficulty arises from the fact that the symbol
distribution is skewed in some way: say you had a binary that
consisted solely of the character 214 (==-42 modulo 256). Then every
byte would have to be escaped as `=@', doubling the size of the
output, compared to say if it was 213 instead. Indeed, this is
significantly worse than either UUencode or Base64.

Basically, taking the worst case scenario, there's an uncertainty of
100% in the number of lines in the output article.

On a further point, limiting the length of the lines just to
accommodate Pascal seems like another rather silly thing to do.
That's a limitation of Pascal, why should everyone else be forced to
live with it?

> And finally, is there a web-based Forum anywhere for yEnc?

Not yet, but I've applied for a SourceForge account for yydecode,
maybe we can use that. (Not that I would condone[0] such a thing.
WWW is not meant for discussions, Usenet is for discussions.)

mata ne,
/Liyang
[0] Note the fallacy in my reasoning here ... Usenet wasn't exactly
meant for transporting binaries either.
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| It's important for us to explain to our nation that life is important. |
| It's not only life of babies, but it's life of children living in, you |
| know, the dark dungeons of the Internet. -- George `Dubya', 2000-10-24 |
Re: [yEnc] some newbie questions
#56535
Author: Kjetil Torgrim Homme
Date: Sat, 16 Feb 2002 01:48
33 lines
2136 bytes
[Liyang Hu]

>   >> A lot of binaries are using a lot of NULL characters
>   > Is this true? Much more so than other byte values?
>   
>   This is a total misconception.

Really?  There are two cases: If the data is compressed, the
distribution is pretty uniform, and ROT42 doesn't make any difference.
If the data isn't compressed, there will typically be a lot of NUL
bytes (think BMP and WAV).  Since yEnc has to escape NUL, CR and LF
(and only these octets), it is very important to make sure that these
byte values appear seldom.

>   There are much better ways of removing skew from the symbol
>   distribution -- eg. XORing the data bytes with a pseudo-random
>   sequence, or better, compress it.

Then it wouldn't be a quick hack to implement it, would it?

>   Adding 42 just shifts the skew elsewhere.

Exactly.

>   Must have been a fan of ``The Hitchiker's Guide to the
>   Galaxy''. Not the best of reasons ...

It's a bit arbitrary, but not entirely.  Why don't you look up the
discussion?

-- 
Kjetil T.
Re: [yEnc] some newbie questions
#56537
Author: J.B. Moreno
Date: Sat, 16 Feb 2002 03:59
25 lines
2111 bytes
In article <a4kc41$ou1$2@pegasus.csx.cam.ac.uk>, 
 Liyang Hu <newsgroups@nerv.cx> wrote:

> On a further point, limiting the length of the lines just to
> accommodate Pascal seems like another rather silly thing to do.
> That's a limitation of Pascal, why should everyone else be forced to
> live with it?

The lines are limited by NNTP which says no more than a 1000 bytes per
line (including CRLF).

The lines are NOT limited to accommodate Pascal -- I made a suggestion
(which has been effectively ignored) to accommodate Pascal by having a
*default* line length of 254/255, instead the default has turned out to
be 128/129.

BTW -- note that after 254/255, you quickly get into diminishing
returns for increasing the line length; at 128 the overhead for CRLF is
1.5625%, at 254 the overhead is 0.7874%, at 512 it's 0.3906%.  At the
maximum allowed by NNTP 997/998 it's 0.2006%.  I.e. going from 254 to
997 gains you a half of a percent.

So, to me, accommodating Pascal makes sense -- it's easy and it's drops
the overhead to less than 1%, at which point I say, enoughs enough.
Re: [yEnc] some newbie questions
#56538
Author: Liyang Hu
Date: Sat, 16 Feb 2002 04:36
72 lines
3811 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
> [Liyang Hu]
>> >> A lot of binaries are using a lot of NULL characters
>> > Is this true? Much more so than other byte values?
>> This is a total misconception.
> Really?  There are two cases: If the data is compressed, the
> distribution is pretty uniform, and ROT42 doesn't make any
> difference.

Which is what I was hinting at.

> If the data isn't compressed, there will typically be a lot of NUL
> bytes (think BMP and WAV).

I think you'll find the majority of binaries on usenet consist of
various [MJ]PEG files, and ZIP/RAR/ACE and whatnot.

> Since yEnc has to escape NUL, CR and LF (and only these octets),
> it is very important to make sure that these byte values appear
> seldom.

Without using arithmetic coding, isn't a uniform distribution the
best we can hope to get? (and just cope with having to escape the
three special cases?)

>> There are much better ways of removing skew from the symbol
>> distribution -- eg. XORing the data bytes with a pseudo-random
>> sequence, or better, compress it.
> Then it wouldn't be a quick hack to implement it, would it?

I think you're talking about the Quick Hack way, while I'm talking
about the elegant way. Some times (surprisingly), they're not
mutually compatible.

A PRNG would have taken a few minutes to implement, and a low-
compression pass through zlib not much more work. This would hardly
have had any noticeable impact on performance.

I'm simply commenting on the lack of insight concerning the design
of the encoding ...

>> Adding 42 just shifts the skew elsewhere.
> Exactly.

I'm confused. Which points are you agreeing with me on, and which
ones not? Am I feeling paranoid? Is this something to do with my
lack of sleep? O_o

>> Must have been a fan of ``The Hitchiker's Guide to the Galaxy''.
>> Not the best of reasons ...
> It's a bit arbitrary, but not entirely.  Why don't you look up the
> discussion?

Are you referring to the end of <3b66baf9.13653632@127.0.0.1> ? I
don't get it ... Then again, I only found out about yEnc after my
binaries grabber couldn't decode a couple of articles, about a month
ago. (And I never looked into it much until the day before
yesterday.)

Would have been handy if it was linked to from http://www.yenc.org/
... would someone care to write up / link to a quick 'n' concise
history of its development? (I found a few threads on Google groups,
but I'm sure that's not all of it ...)

oyasumi,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| ``Computer games don't affect kids, I mean if Pac Man affected us as   |
| kids, we'd all be running around in darkened rooms, munching pills and |
| listening to repetitive music.''                                       |
Re: [yEnc] some newbie questions
#56539
Author: Liyang Hu
Date: Sat, 16 Feb 2002 04:47
45 lines
2951 bytes
J.B. Moreno <planb@newsreaders.com> wrote:
> In article <a4kc41$ou1$2@pegasus.csx.cam.ac.uk>, Liyang Hu
> <newsgroups@nerv.cx> wrote:
>> On a further point, limiting the length of the lines just to
>> accommodate Pascal seems like another rather silly thing to do.
> The lines are limited by NNTP which says no more than a 1000 bytes
> per line (including CRLF).

Then you might want to mention this in the yEnc specs, surely?

> The lines are NOT limited to accommodate Pascal -- I made a
> suggestion (which has been effectively ignored) to accommodate
> Pascal by having a *default* line length of 254/255, instead the
> default has turned out to be 128/129.

Kay ... well, that was the only reason I saw mentioned. Sorry if I'm
being a bit slow at figuring out the decisions behind the encoding!
(After all, I've only looked into this a couple of days ago ...)

> BTW -- note that after 254/255, you quickly get into diminishing
> returns for increasing the line length; at 128 the overhead for
> CRLF is 1.5625%, at 254 the overhead is 0.7874%, at 512 it's
> 0.3906%.  At the maximum allowed by NNTP 997/998 it's 0.2006%.
> I.e. going from 254 to 997 gains you a half of a percent.

Yes, thanks. I do maths. ^_-

> So, to me, accommodating Pascal makes sense -- it's easy and it's
> drops the overhead to less than 1%, at which point I say, enoughs
> enough.

Still wouldn't say it was an overwhelming reason though. (Isn't this
contradicting what you just said two paragraphs above?)

I would have said that keeping the line width below 80 characters is
more important, if only to stay in line with existing encodings. But
still, when it comes down to it, it doesn't really matter ...

mata ne,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| Real computer scientists don't write in assembler.                     |
| They don't write in anything less portable than a number two pencil.   |
Re: [yEnc] some newbie questions
#56543
Author: Curt Welch
Date: Sat, 16 Feb 2002 05:34
26 lines
2504 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:
> Would have been handy if it was linked to from http://www.yenc.org/
> ... would someone care to write up / link to a quick 'n' concise
> history of its development? (I found a few threads on Google groups,
> but I'm sure that's not all of it ...)

That is all of it.  It was not a group project.  "The Archiver" just
did it.  He took the time to write it up and post it.  We gave him
comments which were along the same lines as yours ("that's not the way to
do it") but no one took the time to help him "do it right".  We said making
a new standard take hold on usenet is a lot of work and if you want it to
catch on you better do it right.  But instead of worring about doing it
right, he just did it (wrote the code, set up the web site, etc), and now,
because it's useful (cuts article size down by 30%), and simple, it's
spreading like wildfire.  So now usenet has an 8 bit uuencode that's even
more of a hack than uuencode was.

It's amazing how simple it can be to change the world when you push the
right button at the right time. :)

If you want more history, it will have to come from "The Archiver".

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] some newbie questions
#56545
Author: The Archiver
Date: Sat, 16 Feb 2002 08:07
16 lines
1493 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>A PRNG would have taken a few minutes to implement, and a low-
>compression pass through zlib not much more work. This would hardly
>have had any noticeable impact on performance.

Compression is on the "todo" list for yEnc-V2.

Together with "MIME-embedding", "proper draft",
"subject line conventions" and "Message-Headers".

-- 
Juergen, [The Archiver]


Re: [yEnc] some newbie questions
#56546
Author: The Archiver
Date: Sat, 16 Feb 2002 08:16
35 lines
2074 bytes
curt@kcwc.com (Curt Welch) wrote:

>[...]
>We said making
>a new standard take hold on usenet is a lot of work and if you want it to
>catch on you better do it right.  
>[...]

Discussion about a more efficient encoding has been in progress
for the last (>10) years.

>But instead of worring about doing it right, he just did it 

Yes, I did not want to wait the next (>10) years.

And concerning "he just did it":
I hope that the "list of credits" shows how many people 
did influence me, helped me - and are responsible that
yEnc is not completely sick, but seems to work pretty good.

>If you want more history, it will have to come from "The Archiver".

And you need a co-worker named "J.B. Moreno".
Without his ongoing support, help and appearance in a lot of
newsgroups where yEnc was used in first place it would never
start to fly.  (Thanks J.B. - from the bottom of my heart !)

-- 
Juergen, [The Archiver]





Re: [yEnc] some newbie questions
#56547
Author: The Archiver
Date: Sat, 16 Feb 2002 08:20
22 lines
1639 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

>I just dowloaded all the headers for this group yesterday, and my ISP
>has blessed us with a retention of 2 weeks.. I only saw two articles
>concerning yEnc. Could you mail or repost the article you refer to for
>me?

Most discussions about yEnc can be found on groups.google.com.

You find them in the newsgroups:
   news.software.nntp
   comp.mail.mime
   alt.binaries.news-server-copmparison

The keywords are "yEnc" and "qplite".
The time-period should cover entire year 2001.

HTH
-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56551
Author: John De Hoog
Date: Sat, 16 Feb 2002 10:26
22 lines
1988 bytes
On 16-Feb-2002, archiver@i3w.com (The Archiver) wrote:

> >If you want more history, it will have to come from "The Archiver".
>
> And you need a co-worker named "J.B. Moreno".
> Without his ongoing support, help and appearance in a lot of
> newsgroups where yEnc was used in first place it would never
> start to fly.  (Thanks J.B. - from the bottom of my heart !)

Some thanks will also have to go to the people who write news programs, like
Luu Tran (Xnews), Alex Birj (News Pro and also PowerMost), and Phil Sherrod
(News Rover), as well as to the people who took the standard and ran with
it, posting yEnc files that people wanted (in a.b.s.music.classical, one of
the first was Sonata Man, followed by Rip van Classical, The Muse and many
others, some of whom objected loudly at first but then saw the benefits and
began posting with it themselves).

-- 
John De Hoog
http://dehoog.org
Re: [yEnc] some newbie questions
#56554
Author: Kjetil Torgrim Homme
Date: Sat, 16 Feb 2002 12:46
17 lines
1613 bytes
[=-lordsnow-=]

>   > It's a bit arbitrary, but not entirely.  Why don't you look up
>   > the discussion?
>   
>   I just dowloaded all the headers for this group yesterday, and my
>   ISP has blessed us with a retention of 2 weeks.. I only saw two
>   articles concerning yEnc. Could you mail or repost the article you
>   refer to for me?

Here's the thread I was thinking of:

http://groups.google.com/groups?hl=en&selm=0529e.u71200%40archiver.winews.net

-- 
Kjetil T.
Re: [yEnc] some newbie questions
#56557
Author: Liyang Hu
Date: Sat, 16 Feb 2002 15:02
15 lines
1607 bytes
=-lordsnow-= <lordsnow@home.nl> wrote:
> I just dowloaded all the headers for this group yesterday, and my
> ISP has blessed us with a retention of 2 weeks.. I only saw two
> articles concerning yEnc. Could you mail or repost the article you
> refer to for me?

http://groups.google.com/ ^_-

/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| It's important for us to explain to our nation that life is important. |
| It's not only life of babies, but it's life of children living in, you |
| know, the dark dungeons of the Internet. -- George `Dubya', 2000-10-24 |
Re: [yEnc] some newbie questions
#56570
Author: J.B. Moreno
Date: Sat, 16 Feb 2002 23:01
59 lines
3775 bytes
In article <a4ko92$3ol$2@pegasus.csx.cam.ac.uk>, 
 Liyang Hu <newsgroups@nerv.cx> wrote:

> J.B. Moreno <planb@newsreaders.com> wrote:
> > Liyang Hu <newsgroups@nerv.cx> wrote:
> >> On a further point, limiting the length of the lines just to
> >> accommodate Pascal seems like another rather silly thing to do.
> > The lines are limited by NNTP which says no more than a 1000 bytes
> > per line (including CRLF).
> 
> Then you might want to mention this in the yEnc specs, surely?

I'd expect people implementing newsreaders to be aware of things like
that -- but given the problem with the leading period, I guess so.

> > The lines are NOT limited to accommodate Pascal -- I made a
> > suggestion (which has been effectively ignored) to accommodate
> > Pascal by having a *default* line length of 254/255, instead the
> > default has turned out to be 128/129.
> 
> Kay ... well, that was the only reason I saw mentioned. Sorry if I'm
> being a bit slow at figuring out the decisions behind the encoding!
> (After all, I've only looked into this a couple of days ago ...)

No problem.

> > BTW -- note that after 254/255, you quickly get into diminishing
> > returns for increasing the line length; at 128 the overhead for
> > CRLF is 1.5625%, at 254 the overhead is 0.7874%, at 512 it's
> > 0.3906%.  At the maximum allowed by NNTP 997/998 it's 0.2006%.
> > I.e. going from 254 to 997 gains you a half of a percent.
> 
> Yes, thanks. I do maths. ^_-

Didn't mean to be insulting, just throwing out the numbers to make it
clear what is happening.

> > So, to me, accommodating Pascal makes sense -- it's easy and it's
> > drops the overhead to less than 1%, at which point I say, enoughs
> > enough.
> 
> Still wouldn't say it was an overwhelming reason though. (Isn't this
> contradicting what you just said two paragraphs above?)

No.  I said I think it *should* be limited in a way that accommodate
Pascal, but that it's not.  Yes, I know that you get better results if
you don't, and that even in Pascal it's not that difficult to work with
the longer lines, and of course you always have to be prepared to
handle the longer lines -- still it *is* a bit easier, and the results
aren't all that much better.

> I would have said that keeping the line width below 80 characters is
> more important, if only to stay in line with existing encodings. But
> still, when it comes down to it, it doesn't really matter ...

I see absolutely no benefit in keeping the line width below 80 chars. 
The 80 char limit is for text that is going to be displayed for
reading, yEnc isn't a format that is intended to be read.
Re: [yEnc] some newbie questions
#56576
Author: The Archiver
Date: Sun, 17 Feb 2002 08:45
21 lines
1626 bytes
"John De Hoog" <dehoog@dehoog.org> wrote:

>Luu Tran (Xnews), 
>Alex Birj (News Pro and also PowerMost), 
>Phil Sherrod (News Rover), 
>Sonata Man, 
>Rip van Classical, 
>The Muse 

Thanks for adding credits to these fine neticens and programmers.
I'm sure that we cannot create a full list of all the people who 
participated in the yEnc-success-puzzle.
But this was a true case of teamwork.

-- 
Juergen




Re: [yEnc] some newbie questions
#56578
Author: The Archiver
Date: Sun, 17 Feb 2002 09:04
96 lines
5128 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

>You say on your yEnc website that only CR, LF, NUL, and TAB are
>special characters that need to be 'escaped'. Why *only* these four?

You can remove the 'TAB' from the list.

CR & LF must be encoded because some news-software seems to
create own "line-breaks" if a single CR or LF occurs in a message.
NUL must be encoded because it usually terminates a line in the
C-Language. (There are usenet servers which transmit even NUL
in bodies correctly and confuse readers when the final .CRLF comes
in the same data block after a NUL).

All other characters are _usually_ unchanged by the standard NNTP servers
and readers.

>The latest ietf-draft of "News Article Format" states specifically that
>all control codes should be avoided, with the exception of TAB,
>FORMFEED, and BACKSPACE.

This is the same type of restriction as "only 7 bit chars".
yEnc is explicitely violating this rule because news-tools are
_able_ to transport true binaries (with the upper exceptions).

If all news-tools would definitely reject messages with the 8th bit
set - or truncate it - there would be no yEnc.

yEnc is not based on a "standard" - but on the actual abilities of Usenet
and its parts.

>There's some problem with SPACE and TAB getting dropped by
>Gateways if they are at the end of a line (trailing). A quick solution
>for this would be to simply end each line with <some value><CRLF>.
>
>Because Gatways may mangle {, }, |, ^, [, ], `, and \ it's suggested
>that those would be avoided as well.
>
>In short, it looks like there's 39 characters to "escape" including the
>escape-character itself.

We had a short discussion here if trailing spaces in bodies would be
truncated by some news-server-software. And it is possible that other
(exotic) programs might have problems with some special characters
in the first or last column.
But I have been encouraged to ignore this - and rely on the fact that
most news-soft _does_ handle 8 bit correctly - and the rest should
be fixed (earlier or later).

The yEnc draft still contains DOTs and TABs as "encodable"
 - and it is flexible enough to encode all other chars if necessary.
And as soon as it spreads to eMail (or other protocols/formats... XML ?)
it might be necessary to really escape also other charcters.

But the actual status (my knowledge) is that we can easily ignore
all the additional encodings but CRLF+NULL. 


It might be a good idea to contact USEFOR again - perhaps they should at
least mention that a software should be _prepared_ for message bodies
which are fully 8 bit (as yEnc does).

It might be a bad idea to release a standard which would theoretically
forbid yEncoded posts.

>who wants to see the birth of yet
>another half-assed scheme? Like I said before, yEnc is a good idea.. all
>it needs is a good thinking over and proper implementation.

Welcome to n.s.nntp - and perhaps to the yEnc mailing list.
We'll see how much time it will take to create a final spec/RFC.

>I did read all of the text on the sire prior to posting to this NG. The
>draft really needs a new refreshing - it totally lacks on explaining
>*why* you made yEnc work the way it does.

I wrote a kind of "novel" in German language (my native language)
which is now on the yenc.org site (history).  Perhaps someone wants to
translate it. But as these are more "personal experiences" I'm not
sure if it was a good idea to publish them.

>> I personally dont like Web-based forums - they are hard to use and
>> time-consuming.
>
>I just think they're a good source of information for "future 
>generations"... with proper topic admin-ing it would be a LOT easier to
>navigate than what I just did - spend the last few hours reading
>yEnc-related articles on Google :)

I'm still having all the USENET/mail messages about yEnc on my servers
- but I'm afraid that it would take far longer to read them all :-)

-- 
Juergen

Re: [yEnc] some newbie questions
#56584
Author: Kjetil Torgrim Homme
Date: Sun, 17 Feb 2002 15:02
11 lines
1559 bytes
[The Archiver]

>   The yEnc draft still contains DOTs and TABs as "encodable" - and
>   it is flexible enough to encode all other chars if necessary.

Well, to pick a nit: You can't encode � (192) since it turns into =
NUL.  Likewise for CR and LF.

-- 
Kjetil T.
Re: [yEnc] some newbie questions
#56591
Author: Russ Allbery
Date: Sun, 17 Feb 2002 23:43
25 lines
2049 bytes
=-lordsnow-= <lordsnow@home.nl> writes:

> The two problems above may be soved by using the following compression
> scheme (example taken from the BinHex RFC):

>       2) Compression of repetitive characters.

>    ($90 is the marker, encoding is made for 3->255 characters)

>    00 11 22 33 44 55 66 77   -> 00 11 22 33 44 55 66 77
>    11 22 22 22 22 22 22 33   -> 11 22 90 06 33
>    11 22 90 33 44            -> 11 22 90 00 33 44

Yes, compression can help, but that just means that people should compress
the file before sending it.  You don't want to do compression as part of
the encoding; it adds a ton of complexity to the encoding method without
giving as good of compression as a good gzip or zip beforehand, and most
of the files sent over Usenet are already compressed.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [yEnc] some newbie questions
#56593
Author: Liyang Hu
Date: Mon, 18 Feb 2002 01:17
39 lines
2862 bytes
=-lordsnow-= <lordsnow@home.nl> wrote:
> On 16 Feb 2002 01:20:01 GMT, Liyang Hu <newsgroups@nerv.cx> wrote:
>> >> A lot of binaries are using a lot of NULL characters
>> > Is this true? Much more so than other byte values?
>> Again, this difficulty arises from the fact that the symbol
>> distribution is skewed in some way: say you had a binary that
>> consisted solely of the character 214 (==-42 modulo 256). Then every
>> byte would have to be escaped as `=@', doubling the size of the
>> output, compared to say if it was 213 instead. Indeed, this is
>> significantly worse than either UUencode or Base64.
> The two problems above may be soved by using the following
> compression scheme (example taken from the BinHex RFC):

>      2) Compression of repetitive characters.

>   ($90 is the marker, encoding is made for 3->255 characters)

>   00 11 22 33 44 55 66 77   -> 00 11 22 33 44 55 66 77
>   11 22 22 22 22 22 22 33   -> 11 22 90 06 33
>   11 22 90 33 44            -> 11 22 90 00 33 44

Nooo! You've just described RLE (run-length encoding). It's not even
something worth mentioning in a CS textbook ...

If you must use compression, zlib has been around for years, is
/very/ easy to use, and it's free, in the sense that even commercial
programs may use it.

Personally, I think it should be up to the user to compress their
own data. Remember, this is an encoding format, not another
compressed file format. Keep it simple.

/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| "Up your butt with a coconut!"                                         |
| "You've got facial hair like a polar bear!"                            |
|   -- Daphne and Celeste: "Ooh Stick You"                               |
Re: [yEnc] some newbie questions
#56595
Author: Kjetil Torgrim Homme
Date: Mon, 18 Feb 2002 01:45
20 lines
1822 bytes
[Liyang Hu]

>   Nooo! You've just described RLE (run-length encoding). It's not
>   even something worth mentioning in a CS textbook ...
>   
>   If you must use compression, zlib has been around for years, is
>   /very/ easy to use, and it's free, in the sense that even
>   commercial programs may use it.
>   
>   Personally, I think it should be up to the user to compress their
>   own data. Remember, this is an encoding format, not another
>   compressed file format. Keep it simple.

Agreed, but the current = escape is wasteful.  Only seven of 256
possible codes are used/needed.  The remainder could be used for some
common predefined byte sequences.

-- 
Kjetil T.
Re: [yEnc] some newbie questions
#56599
Author: Andrew Gierth
Date: Mon, 18 Feb 2002 02:35
16 lines
1803 bytes
>>>>> "lordsnow" == =-lordsnow-=  <lordsnow@home.nl> writes:

 lordsnow> I was just thinking... it may be a good idea to write to
 lordsnow> News software authors (I'm talking about companies who make
 lordsnow> INN, Cyclone, Typhoon, Breeze) and check how "8-bit" ready
 lordsnow> they (and their customers) are?

All widely deployed news transport software is 8-bit clean.

People have been using 8-bit character sets like ISO 8859-1, KOI-8,
etc., for many years without any problems (or any need to use QP or
other 7-bit encodings in article bodies).

-- 
Andrew.
Re: [yEnc] some newbie questions
#56601
Author: Liyang Hu
Date: Mon, 18 Feb 2002 02:50
31 lines
2264 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
> [Liyang Hu]
>> Personally, I think it should be up to the user to compress their
>> own data. Remember, this is an encoding format, not another
>> compressed file format. Keep it simple.
> 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, TAB, CR, LF and
`='. That's five at most.) And there are only 256-5 = 251 possible
codes.

> The remainder could be used for some common predefined byte
> sequences.

Right ... we've just agreed that it would be best if the input
stream is random (due to compression). Care to list some `common'
byte sequences?

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.

/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| > Ever heard of .cshrc?                                                |
| That's a city in Bosnia. Right?                                        |
Re: [yEnc] some newbie questions
#56602
Author: J.B. Moreno
Date: Mon, 18 Feb 2002 02:53
11 lines
1478 bytes
In article <3c714131.11781683@news>,
 =-lordsnow-= <lordsnow@home.nl> wrote:

> That's what I mean...  I would hate to be behind a gateway or have to
> use a news server that mangles 8-bit attachements when the whole world
> is using yEnc.

Since that would be a problem with the gateway, the correct solution
would be to write the person managingth gatway and tell him to fix the
problem.
Re: [yEnc] some newbie questions
#56609
Author: Kjetil Torgrim Homme
Date: Mon, 18 Feb 2002 04:45
37 lines
2588 bytes
[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, TAB, CR, LF and
>   `='. That's five at most.) And there are only 256-5 = 251 possible
>   codes.

NUL, CR, LF and their reflexive value, as well as =.

>   > The remainder could be used for some common predefined byte
>   > sequences.
>   
>   Right ... we've just agreed that it would be best if the input
>   stream is random (due to compression). 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.

>   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.

-- 
Kjetil T.
Re: [yEnc] some newbie questions
#56614
Author: 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?                                        |
Re: [yEnc] some newbie questions
#56650
Author: The Archiver
Date: Tue, 19 Feb 2002 07:24
22 lines
1930 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:

>[The Archiver]
>
>>   The yEnc draft still contains DOTs and TABs as "encodable" - and
>>   it is flexible enough to encode all other chars if necessary.
>
>Well, to pick a nit: You can't encode � (192) since it turns into =
>NUL.  Likewise for CR and LF.

I dont believe that there would be any reason to encode characters
between 128-255. These are not used today in the 7 bit world.

Just the existing set: (0-127) must be encodable (to =64 .. =191).
A good question would be if an encoded character as ( =127 ) could
cause problems at the end of a line. 
Fortunately the encoding cannot create =<space> or =<tab>.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56651
Author: The Archiver
Date: Tue, 19 Feb 2002 07:46
35 lines
2161 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

>> Basically, taking the worst case scenario, there's an uncertainty of
>> 100% in the number of lines in the output article.

Yes. This is theoretically correct.
But you should also add the probabilty of such cases.

btw.: There are also people sending out winword-DOC files
with 10 MB embedded bitmaps consiting of zeros today.

Most binaries are submitted today in heavily compressed
form (JPG, MPG, DivXAVI, ZIP, RAR). 

yEnc is not the best encoding overall.
But it might be the optimum for encoding and triviality. 

>The two problems above may be soved by using the following
>compression scheme (example taken from the BinHex RFC):

There are _many_ options how to reduce the size of 
an encoded file - and how to avoid rare special cases.

But to keep yEnc simple and easy I would propose
that we find one _good_ public domain compression
which becomes a part of the yEnc spec.

I'm still searching for a pd-source which is portable
enough for all platforms - an could be implemented
easily into existing yDecoders.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56653
Author: The Archiver
Date: Tue, 19 Feb 2002 07:48
23 lines
1789 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>If you must use compression, zlib has been around for years, is
>/very/ easy to use, and it's free, in the sense that even commercial
>programs may use it.

Great tip - thanks.

>Personally, I think it should be up to the user to compress their
>own data. Remember, this is an encoding format, not another
>compressed file format. Keep it simple.

I've seen a lot of requests (news+mail) for an integrated 
compression. People HATE to do these additional steps.
Integrated compression might even BOOST yEnc to 99%.

Compression is TOP-2 on my personal todo list for yEnc.
(Right behind a proper draft :-)

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56663
Author: Liyang Hu
Date: Tue, 19 Feb 2002 17:09
15 lines
1626 bytes
The Archiver <archiver@i3w.com> wrote:
> Compression is TOP-2 on my personal todo list for yEnc.
> (Right behind a proper draft :-)

A draft (by definition) does not have to be proper. Could you put it
up somewhere so we can have a look and offer some comments and
suggestions?

Cheers,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| Real programmers don't comment their code.                             |
| It was hard to write, it should be hard to understand.                 |
Re: [yEnc] some newbie questions
#56664
Author: Liyang Hu
Date: Tue, 19 Feb 2002 17:21
31 lines
2300 bytes
The Archiver <archiver@i3w.com> wrote:
> But to keep yEnc simple and easy I would propose that we find one
> _good_ public domain compression which becomes a part of the yEnc
> spec.

> I'm still searching for a pd-source which is portable enough for
> all platforms - an could be implemented easily into existing
> yDecoders.

zlib[0]. I mentioned this somewhere else in this thread. It's been
available for years, used by just about every major piece of
software in existence, ported to /every/ major OS in existence, and
is freely available for use by any application, Free or commercial.

Not public domain, but then again, have you actually read the
conditions for distributing / using it?

There's also libbzip2[1], which offers higher compression at the
cost of more computational power. Works on any platform with an ANSI
C compiler. It's got a BSD-style license, ie. free-for-all.

Why are you still searching?

/Liyang
[0] http://www.gzip.org/zlib/
[1] http://sources.redhat.com/bzip2/
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| Real computer scientists don't write in assembler.                     |
| They don't write in anything less portable than a number two pencil.   |
Re: [yEnc] some newbie questions
#56666
Author: JanC
Date: Tue, 19 Feb 2002 18:25
27 lines
2111 bytes
The Archiver <archiver@i3w.com> wrote:

> I've seen a lot of requests (news+mail) for an integrated 
> compression. People HATE to do these additional steps.
> Integrated compression might even BOOST yEnc to 99%.
> 
> Compression is TOP-2 on my personal todo list for yEnc.
> (Right behind a proper draft :-)

Please... No integrated compression!

What you gonna do when there comes a new (free) compression method that 
has better compression (maybe on certain popular filetypes)?  People 
will ask you to add that one too.  And after you added that one, more 
compression methods will show up, with people requesting for addition.

That way you can go on forever.

If they want 1-click compression + encoding + posting, that's something 
that should (and easily could) be implemented in the newsclient.
It should never be part of the encoding.

-- 
JanC

Petition against spam in the EU: <http://www.politik-digital.de/spam/>
Re: [yEnc] some newbie questions
#56667
Author: Russ Allbery
Date: Tue, 19 Feb 2002 18:34
22 lines
1991 bytes
The Archiver <archiver@i3w.com> writes:

> I've seen a lot of requests (news+mail) for an integrated
> compression. People HATE to do these additional steps.  Integrated
> compression might even BOOST yEnc to 99%.

What do you think people are posting with yEnc that will compress?

GIFs are already compressed.  JPEGs are already compressed.  MP3s are
already compressed.  MPEG streams are already compressed.  Software ZIP
files are already compressed.  Do you really get a lot of people posting
raw uncompressed software or BMP files or something?

Compressing any of the standard binaries that you normally see on Usenet
will actually make them larger.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: [yEnc] some newbie questions
#56674
Author: The Archiver
Date: Wed, 20 Feb 2002 06:35
24 lines
1760 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>> Compression is TOP-2 on my personal todo list for yEnc.
>> (Right behind a proper draft :-)
>
>A draft (by definition) does not have to be proper. Could you put it
>up somewhere so we can have a look and offer some comments and
>suggestions?

My draft is still on www.yenc.org:
   http://www.winews.net/yenc/yEnc-draft-1.txt

Steve made already a rework of it which I' currently checking:
   http://www.yenc32.com/developers/

I believe that the discussion about the final draft should be done
one the mailing list.

-- 
Juergen, [The Archiver]



Re: [yEnc] some newbie questions
#56676
Author: The Archiver
Date: Wed, 20 Feb 2002 06:47
50 lines
3037 bytes
Russ Allbery <rra@stanford.edu> wrote:

>> I've seen a lot of requests (news+mail) for an integrated
>> compression. People HATE to do these additional steps.  Integrated
>> compression might even BOOST yEnc to 99%.
>
>What do you think people are posting with yEnc that will compress?

Some binary formats are still compressible (even if just 5% :-).

>Do you really get a lot of people posting
>raw uncompressed software or BMP files or something?

It is not so much that people are posting uncompressed files
but that we are seeing the ongoing discussion about RLE encoding
and extreme cases of encodings which can blow up the size of
a yEncoded file to 200%. 
An integrated compression would solve _all_ these problems
with _one_ feature.

And finally yEnc will also spread to eMail earlier or later
(after the MIME embedding is done ;-)
People _love_ to send WinWord-Docs and PowerPoints by eMail.

Another future application will be to post an HTML PAGE together
with all pics and parts as one message (to news or mail). There
a compression would be also helpful.

>Compressing any of the standard binaries that you normally see on Usenet
>will actually make them larger.

Of course the yEncoder has to detect if compression makes sense.
A compressor which is not able to detect that the result is larger
than the source is not worth thinking about.


We all know that it is really difficult to invent new things on Internet today.
Changing all major newsreaders (+mailers) to accept new methods takes
usually years. yEnc is a _chance_ to have all these folks together doing
the job _once_ (for yEncoding). If we can convince them to add a 
freeware compression then the topics "encoding and compression over
Usenet and mail" are finished for a very long time.

We can also continue to discuss about efficiency of encodings and 
compression for the next years - but I beleive that this is the right time.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56675
Author: The Archiver
Date: Wed, 20 Feb 2002 06:56
47 lines
2940 bytes
JanC <usenet_spam@janc.cjb.net.invalid> wrote:

>> Compression is TOP-2 on my personal todo list for yEnc.
>> (Right behind a proper draft :-)
>
>Please... No integrated compression!

People are talkign about a better encoding (RLE-encoding, compression)
again and again. 
If we do something into this direction then I want to propose to use a
_real_ compression - once !

>What you gonna do when there comes a new (free) compression method that 
>has better compression (maybe on certain popular filetypes)?  

The performance of compression did not change very much in the
last 5 years. So we dont have to expect a drastical improvement
in a short time.
However yEnc would be subject to improvement and changes 
as well as any other format/standard/...

>If they want 1-click compression + encoding + posting, that's something 
>that should (and easily could) be implemented in the newsclient.
>It should never be part of the encoding.

Sorry, but you are really wrong here:
Today you need a MasterSplitter (.001 .002), WinZip (.zip), WinRAR (.RAR)
WinAce (.ace) SmartPar (.par) - and even other programs which are 
partially not even freeware !

Compression is something people need and want.
And if we give them an efficient, free compressed encoding then life 
would be far easier than before.

I like modularty of software myself - but we are talking about 
_one_ job: Transmitting a file through a network without wasting
ressources. A good encoding does not add more overhead than
necessary - and it even reduces the size if possible.
So compression and encoding are so closely related that
there are just few arguments (mainly complexity) against it.

Did I explain it better this time ?

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56677
Author: The Archiver
Date: Wed, 20 Feb 2002 07:05
22 lines
1829 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

>> Compression is TOP-2 on my personal todo list for yEnc.

>I thought it was yEnc, not yComp? Sounds like your out to
>re-invent MIME.
>Compression should be handled by the News Agent.

Today compression is handled by the users - manually.
And News Agents will never again handle integrated compression
because there are too many methods - some are not even freeware.

The only chance I see for integrating compression into the NewsAgent
would be a new (and free) format.

If the yEnc spec proposes to use a free XXzip lib and offers the 
sourcecode then this topic would be also solved for a very long time.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56680
Author: Liyang Hu
Date: Wed, 20 Feb 2002 11:19
41 lines
2895 bytes
The Archiver <archiver@i3w.com> wrote:
> An integrated compression would solve _all_ these problems with
> _one_ feature.

I'll bite: give me a few days, and I'll give you a *simple*[1]
reference arithmetic coder[0] that avoids these problems without
having to resort to using compression libraries.

Say if we forbid the use of /all/ control characters (that's 32 of
them), we're left with 224 symbols out of 256. This still gets us

    log_2 224 == 7.81 bits

ie. we waste 0.19 bits for every 8 we send, which corresponds to
2.4%. Compare this with the current yEnc method, where we escape on
average, 4 different characters for every 256 sent, and you see that
the waste in this case is 1-256/260 == 1.5%. This may looks better
on the surface, but then again, only 4 symbols out of 256 are
disallowed.

If say we allow 16 of the 32 control characters (ie. use 240 of the
256 possible symbols), we get a redundancy of 1.2%. Add on
compression[2], and see which one fairs better. You do the maths.

Google for `arithmetic coding' if you need background reading.

/Liyang
[0] ie. representing 256 different symbols using only 224, say. No
    escape codes necessary. (Note that Base64 and UUEncode are just
    special cases of this, where we only use 64 different symbols.)
[1] As in, no compression, hence no statistical modelling and other
    messy stuff.
[2] Arithmetic coding with statistical modelling beats zlib any day,
    although I can't attest to the existence of any readily
    available, Free (as opposed to GNU Free), *and* easily portable
    source code. I still think you should leave compression out of it.
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| Real computer scientists don't write in assembler.                     |
| They don't write in anything less portable than a number two pencil.   |
Re: [yEnc] some newbie questions
#56682
Author: Liyang Hu
Date: Wed, 20 Feb 2002 11:59
60 lines
3773 bytes
The Archiver <archiver@i3w.com> wrote:
> JanC <usenet_spam@janc.cjb.net.invalid> wrote:
>>Please... No integrated compression!
> People are talkign about a better encoding (RLE-encoding,
> compression) again and again. If we do something into this
> direction then I want to propose to use a _real_ compression -
> once !

I don't think any of the people who will be doing the actual
implementation want to do this though. As JanC said, this is a
application-level issue, and we should not bloat the encoding format
because of it.

>>What you gonna do when there comes a new (free) compression method
>>that has better compression (maybe on certain popular filetypes)?  
> The performance of compression did not change very much in the
> last 5 years. So we dont have to expect a drastical improvement in
> a short time.

And in the long term? I fail to see any widespread usage of the
Burrow-Wheeler Transform being used outside of the UN*X world.
Should that eventually catch on under Windows? Will you adopt it?

Research in compression methods is still ongoing, it's most
definitely not a `done' subject. You never know, we might get a
drastic improvement in the next couple of years.

> However yEnc would be subject to improvement and changes as well
> as any other format/standard/...

I don't think uuencode has been modified since it was proposed. I
don't think the gzip format has changed since it was originally
designed either. Well-designed formats *do not change*. If there's a
need for change, then it simply shows it wasn't thought out well
enough to begin with.

Think about it: if you keep modifying it, then it won't be the same
standard anymore. If that's what you propose, then I seriously
question your use of the word `standard'. Surely you mean `format'?

> Compression is something people need and want. And if we give them
> an efficient, free compressed encoding then life would be far
> easier than before.

And we'll see this new /encoding/ `standard' being obsoleted every
couple of years.

> Did I explain it better this time ?

Yes, I can't speak for everyone here, but at least I understand you
perfectly. But this does not mean we all agree with you. ^_-

mata ne,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| It's important for us to explain to our nation that life is important. |
| It's not only life of babies, but it's life of children living in, you |
| know, the dark dungeons of the Internet. -- George `Dubya', 2000-10-24 |
Re: [yEnc] some newbie questions
#56695
Author: Dirk Nimmich
Date: Wed, 20 Feb 2002 19:16
16 lines
1661 bytes
The Archiver wrote:
> Another future application will be to post an HTML PAGE together
> with all pics and parts as one message (to news or mail).

You can already do it, and FWIW, it's already done. Read the MIME
specs.

> There a compression would be also helpful.

Read again Russ' article. He already pointed out that image formats
used today are almost all compressed formats. (That's even more
true for those image formats that can be used with a browser: JPEG,
GIF, and PNG.)

I still wonder what this has to do with NNTP.
Re: [yEnc] some newbie questions
#56700
Author: Curt Welch
Date: Wed, 20 Feb 2002 23:45
34 lines
2923 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:
> Right ... we've just agreed that it would be best if the input
> stream is random (due to compression). Care to list some `common'
> byte sequences?

No, idealy you don't want it random.  You want it skewed away from
the special characters.  You want it to contain no NULLs, CR, LFs etc.

> 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.

If the data is already skewed, it's better to use the skew to your
advantage than it is to randomize it with XOR.  If a dataset is skewed to
contain more NULLs, then that means it's also likely to contain less of
every other character than a random dataset of the same size would contain.
i,e. it's skewed.  And in that case, shifting the skew away from NULL will
be a better solution that randomizing the data.

I don't know if the +42 shift is actaully better for typical usenet data
than an XOR, but if I had to pick, I'd bet that the +42 shift worked out on
average to be better.  And it's simpler as well.

The XOR trick has the nice effect of reducing the probability of a worse
case, but worse case problems with the +42 shift are likely to be totaly
unimportant anyway so doing something to reduce the odds further isn't
likely to have enough value to justify.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] some newbie questions
#56703
Author: JanC
Date: Thu, 21 Feb 2002 03:58
21 lines
2018 bytes
The Archiver <archiver@i3w.com> wrote:

> Sorry, but you are really wrong here:
> Today you need a MasterSplitter (.001 .002), WinZip (.zip), WinRAR
> (.RAR) WinAce (.ace) SmartPar (.par) - and even other programs
> which are partially not even freeware !

- PAR & splitter software are freeware
- There are lots of freeware ZIP archivers and some of them have up to
  20% better compression than WinZip (e.g. 7-Zip)
- ACE files can be created for free with the command-line utilities
  AFAIK.
- There is no freeware to create RAR files (that I know of).
- There are lots of freeware & open source compression programs that
  often perform better than any of the well known commercial ones

-- 
JanC

Petition against spam in the EU: <http://www.politik-digital.de/spam/>
Re: [yEnc] some newbie questions
#56707
Author: JanC
Date: Thu, 21 Feb 2002 04:20
14 lines
1593 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

> [0] ie. representing 256 different symbols using only 224, say. No
>     escape codes necessary. (Note that Base64 and UUEncode are just
>     special cases of this, where we only use 64 different symbols.)
 
A sort of BASE-224 encoding for Usenet already exists:
<http://b-news.sf.net/>

-- 
JanC

Petition against spam in the EU: <http://www.politik-digital.de/spam/>
Re: [yEnc] some newbie questions
#56712
Author: The Archiver
Date: Thu, 21 Feb 2002 06:57
30 lines
2181 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>> An integrated compression would solve _all_ these problems with
>> _one_ feature.
>
>I'll bite: give me a few days, and I'll give you a *simple*[1]
>reference arithmetic coder[0] that avoids these problems without
>having to resort to using compression libraries.

I believe that using a good compression lib would not be 
harder to implement than such an arithmetic encoder.

And you dont solve the request for runlength encoding.
And you dont solve the still pending request for compression.

If we do such a step, then we need three steps to reach what
we could get easily by using an integrated compression from
the beginning.

>Say if we forbid the use of /all/ control characters (that's 32 of
>them), we're left with 224 symbols out of 256. This still gets us

Someone (J.B. ?) told me that he created such an encoding a long
time ago - but it was never adopted by others. He told me that
yEnc would be superior so he would not try to continue it.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56713
Author: The Archiver
Date: Thu, 21 Feb 2002 07:09
42 lines
2572 bytes
Dirk Nimmich <nimmich@muenster.de> wrote:

>The Archiver wrote:
>> Another future application will be to post an HTML PAGE together
>> with all pics and parts as one message (to news or mail).
>
>You can already do it, and FWIW, it's already done. Read the MIME
>specs.

I have never seen a MIME encoding which supports compression.
MIME would offer proper segmentation of such a post - but how
would the compression be integrated ?
It might be possible to compress the single parts individually 
and then pack them all in different MIME parts - or pack them
in advance and use one big section.
However the sender and the receiver need the use compressor
and decompressor to use his.

>Read again Russ' article. He already pointed out that image formats
>used today are almost all compressed formats. (That's even more
>true for those image formats that can be used with a browser: JPEG,
>GIF, and PNG.)

<Smile>

Whenever someone told me that he wanted compression in yEnc then
I told him that most formats on Usenet today are already compressed
formats. I told him that we would move compression to yEnc-V2.
(It was _my_ argument that we dont need compression in the first stage).

Now we _are_ up to yEnc-V2.
And now we are _talking_ about compression.

>I still wonder what this has to do with NNTP.

yEnc is an 8-bit-encoding which is especially designed
to be transported with NNTP.

-- 
Juergen, [The Archiver]

Re: [yEnc] some newbie questions
#56714
Author: The Archiver
Date: Thu, 21 Feb 2002 07:38
94 lines
4547 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>> People are talkign about a better encoding (RLE-encoding,
>> compression) again and again. If we do something into this
>> direction then I want to propose to use a _real_ compression -
>> once !
>
>I don't think any of the people who will be doing the actual
>implementation want to do this though. As JanC said, this is a
>application-level issue, and we should not bloat the encoding format
>because of it.

As I already answered to Dirk I'm fully aware of this
- and I used this argument whenever someone wanted RLE or arith-enc
or compression. 

But - as we see - the wish for even more effiency comes back all
the time.

Believe me: I _dont_ insist on compression - but I'd rather like to 
implement a true compression than anything else to improve efficiency.
And I believe that there are enough reasons to justify compression.

<begin of smalltalk>
 
>Research in compression methods is still ongoing, it's most
>definitely not a `done' subject. You never know, we might get a
>drastic improvement in the next couple of years.

This should not prevent us from using existing techniques.
It takes long enough to make even small changes.

>> However yEnc would be subject to improvement and changes as well
>> as any other format/standard/...
>
>I don't think uuencode has been modified since it was proposed. 

LOL - it cannot be modified because it has not options.
And the result is that it must be replaced _completely_ now.

> Well-designed formats *do not change*. 

What is the actual version number of HTML ?
What is the actual version number of HTTP ?
What is the actual version of JAVA ?

<sarcasm on>
Of course: The actual "MIME-Version: 1.0" is still used.  
<sarcasm off>

>Think about it: if you keep modifying it, then it won't be the same
>standard anymore. If that's what you propose, then I seriously
>question your use of the word `standard'. Surely you mean `format'?

Actually I mean "draft".

>And we'll see this new /encoding/ `standard' being obsoleted every
>couple of years.

USEFOR is releasing a new standard for Usenet messages.
NNTP-EXT is releasing a new standard for NNTP/RFC977.

Should we stick with UUencode and BASE64 for the rest of our live
just because they are "standards" ?

<end of smalltalk>

>Yes, I can't speak for everyone here, but at least I understand you
>perfectly. But this does not mean we all agree with you. ^_-

I know there are pro's and con's. They always are there.
And be sure that I can fully understand your point of view.

Some people want compression (or RLE or ARITH or ..) in yEnc.
Some people dont like compression but XXX, YYY, ZZZ in yEnc.
Some people want to leave it as it is.

The last time _I_ was the one who made the decisions. 
I simply did it. And I've been attacked often enough for the 
"badly designed" format.

Again we can discuss this topic for the next few months 
- and finally we will have exactly the same situation as today.

Some want it - some not.

As I dont believe that votes can help us here and I dont like
to be the "lonely wolf" again I'd prefer to add compression
as an option. Then programmers can decide if they implement it
- or not - and the "market (users) will decide".

-- 
Juergen
Re: [yEnc] some newbie questions
#56715
Author: The Archiver
Date: Thu, 21 Feb 2002 07:50
48 lines
2720 bytes
JanC <usenet_spam@janc.cjb.net.invalid> wrote:

>> and even other programs
>> which are partially not even freeware !
>
> [...]
>- ACE files can be created for free with the command-line utilities
>  AFAIK. 

I saw only the shareware version of WinAce.
They did even remove the "sponsored freeware" from their site.

>- There is no freeware to create RAR files (that I know of).

The mostly used compressor on Usenet today. LOL !


<smalltalk on>

>- There are lots of freeware & open source compression programs that
>  often perform better than any of the well known commercial ones

Yes - and a new one is coming up all the time.

Actually it seems to be a nice method to send binaries to Usenet with
a new compressor. Then people _need_ to get it. (I did download
WinAce last week because someone posted in this format).

Perhaps Microsoft will soon present an own integrated compressor
into Outlook Express ?  Combined with DRM ?
They would even have the argument that using their compression would
be superior and saving ressources ?
(Did you ever receive an eMail with an MS/TNEF-attachment type ?)

<smalltalk off>

Today compression is done on the "enduser-level".
Some friends say: "This is a layer-8 problem".

But _we_ are having the problem that the bandwidth and size is
sent through our channels - using our ressources.
This is why "yEnc" has been designed: To avoid waste.
I believe that compression would be another logical step.

-- 
Juergen

Re: [yEnc] some newbie questions
#56723
Author: Francois Petillon
Date: Thu, 21 Feb 2002 10:55
26 lines
2304 bytes
JanC wrote:
> A sort of BASE-224 encoding for Usenet already exists:
> <http://b-news.sf.net/>

After a quick look, the encoding/decoding algorithm seems much
nicer than yenc one. And a base-224 decoder should be a little
more CPU-friendly than yenc (which can be important for webnews
interfaces when decoding files or for news feeders to filter 
corrupted articles). A CRC is a good idea but a few things are
bugging me on yenc way to manage it :
- you should not have to decode the part to process it
- it should be global to the body of an article (adding a new
X-Body-CRC field to the header ?) and, thus, CR/LF insensitive

This would allow feeders to filter any kind of corrupted
article, without having to decode nor to know how to decode
parts. Moreover the CRC will be processed only when it exists.

<me2>
Once more, things should be kept as simple as possible : 
compression or redundant parity files should not be managed by 
the encoder/decoder...
</me2>

   Fran�ois
Re: [yEnc] some newbie questions
#56729
Author: Dirk Nimmich
Date: Thu, 21 Feb 2002 18:32
37 lines
2598 bytes
The Archiver wrote:
> Dirk Nimmich <nimmich@muenster.de> wrote:
>>The Archiver wrote:
>>> Another future application will be to post an HTML PAGE together
>>> with all pics and parts as one message (to news or mail).
>>
>>You can already do it, and FWIW, it's already done. Read the MIME
>>specs.
> 
> I have never seen a MIME encoding which supports compression.

I didn't talk about compression but about the possibility to send a
"HTML page together with all pics and parts as one message".

> MIME would offer proper segmentation of such a post - but how
> would the compression be integrated ?

No, and that is intentional. The structure of a message should be
visible without the need of decoding, e.g. to be able to extract
any part of the message easily. So at least this:

> It might be possible to compress the single parts individually 
> and then pack them all in different MIME parts

is necessary if you have this design goal in mind.

There's a Content-Encoding header that could be used for it if
USENET was binary clean. (HTTP uses it.) But if this was possible
we would also be able to send messages with Content-Transfer-
Encoding: binary and also would not need yenc.

> yEnc is an 8-bit-encoding which is especially designed
> to be transported with NNTP.

Ah. I thought yenc was to be used on complete USENET, not just
sites using NNTP for carrying articles. Sorry.
Re: [yEnc] some newbie questions
#56732
Author: J.B. Moreno
Date: Thu, 21 Feb 2002 19:18
20 lines
2015 bytes
In article <3C74D21B.F49E2F9F@proxad.net>, Francois Petillon
<fanch@proxad.net> wrote:

> JanC wrote:
> > A sort of BASE-224 encoding for Usenet already exists:
> > <http://b-news.sf.net/>
> 
> After a quick look, the encoding/decoding algorithm seems much
> nicer than yenc one. And a base-224 decoder should be a little
> more CPU-friendly than yenc (which can be important for webnews
> interfaces when decoding files or for news feeders to filter 
> corrupted articles). 

The encoder is (according to the author) CPU intensive.

And I don't see why it should be any more CPU friendly than yEnc; yEnc
seems friendly enough to me, and if you really feel you /must/ save
every cycle that you can, don't do the math, use the existing value as
an index into an array.  That ought to be fast enough for anyone.
Re: [yEnc] some newbie questions
#56735
Author: J.B. Moreno
Date: Thu, 21 Feb 2002 19:26
15 lines
1680 bytes
In article <17577.l22201@archiver.winews.net>, 
 The Archiver <archiver@i3w.com> wrote:

> Liyang Hu <newsgroups@nerv.cx> wrote:
-snip-
> >Say if we forbid the use of /all/ control characters (that's 32 of
> >them), we're left with 224 symbols out of 256. This still gets us
> 
> Someone (J.B. ?) told me that he created such an encoding a long
> time ago - but it was never adopted by others. He told me that
> yEnc would be superior so he would not try to continue it.

Nope, I told you that Luc Van der Veken had created such an encoding
(b-news).  I believe yEnc is better/faster.
Re: [yEnc] some newbie questions
#56743
Author: Curt Welch
Date: Thu, 21 Feb 2002 21:40
28 lines
2334 bytes
usenet@janc.cjb.net wrote:
> Liyang Hu <newsgroups@nerv.cx> wrote:
>
> > [0] ie. representing 256 different symbols using only 224, say. No
> >     escape codes necessary. (Note that Base64 and UUEncode are just
> >     special cases of this, where we only use 64 different symbols.)
>
> A sort of BASE-224 encoding for Usenet already exists:
> <http://b-news.sf.net/>

Base 251 encoding would be a lot of math overhead and produce almost
exactly the same expansion as the escape expansion already defined for
yEnc.

For each 256 random characters now, yenc would need to expand about 5
characters in that set to twice their size, giving you a 256 to 261
expansion.

Base 251 encodng would turn 256 characters into 256 * 256 / 251 or 261.09
characters giving you a 256 to 261.09 expansion.

And with a fixed encodidng like that, you have no simple options on the
encoding side to escape extra characters.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] some newbie questions
#56747
Author: JanC
Date: Thu, 21 Feb 2002 22:38
12 lines
1563 bytes
J.B. Moreno <planb@newsreaders.com> wrote:

> The encoder is (according to the author) CPU intensive.

Not only according to him, I use it and compared to yEnc it *is* more 
CPU intensive...

-- 
JanC

Petition against spam in the EU: <http://www.politik-digital.de/spam/>
Page 1 of 3 • 110 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads