🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
32 messages
32 total messages Started by Liyang Hu Wed, 20 Feb 2002 12:28
[yEnc] Survey time! (Compression or not?)
#56685
Author: Liyang Hu
Date: Wed, 20 Feb 2002 12:28
15 lines
1507 bytes
Compression or not?

    http://sourceforge.net/survey/?group_id=46759

(And on a side note: Is anyone actually using the yEnc mailing list?
I've not received anything from it so far. The discussion is getting
more and more specialised for this NG, so we should probably move
the discussion there some time.)

/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] Survey time! (Compression or not?)
#56710
Author: J.B. Moreno
Date: Thu, 21 Feb 2002 02:41
7 lines
1113 bytes
In article <a504os$736$6@pegasus.csx.cam.ac.uk>, 
 Liyang Hu <newsgroups@nerv.cx> wrote:

> Compression or not?

Not as part of the encoding.
Re: [yEnc] Survey time! (Compression or not?)
#56702
Author: Curt Welch
Date: Thu, 21 Feb 2002 04:01
14 lines
1462 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <a504os$736$6@pegasus.csx.cam.ac.uk>,
>  Liyang Hu <newsgroups@nerv.cx> wrote:
>
> > Compression or not?
>
> Not as part of the encoding.

Why not?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56708
Author: JanC
Date: Thu, 21 Feb 2002 04:25
11 lines
1254 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

> Compression or not?

Compression shouldn't be part of the encoding IMO...

-- 
JanC

Petition against spam in the EU: <http://www.politik-digital.de/spam/>
Re: [yEnc] Survey time! (Compression or not?)
#56709
Author: Jeremy
Date: Thu, 21 Feb 2002 05:40
17 lines
1323 bytes
Curt Welch <curt@kcwc.com> wrote:

>>> Compression or not?
>>
>> Not as part of the encoding.
> 
> Why not?

Because it's stupid.  Most of the things posted as binaries are already
compressed, so an additional compression step would be wasteful and may
actually make the resulting post larger in many cases.  Those few things
that aren't already compressed can and should easily be compressed
outside of the encoding step.

-- 
Jeremy  |  jeremy@exit109.com
Re: [yEnc] Survey time! (Compression or not?)
#56720
Author: The Archiver
Date: Thu, 21 Feb 2002 08:36
56 lines
2803 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:

>Compression or not?
>    http://sourceforge.net/survey/?group_id=46759

SourceForge Site Login
Internet Explorer users need to upgrade to IE 5.01 
or higher, preferably with 128-bit SSL or use Netscape 4.7 or higher
Cookies must be enabled past this point. 

I know exacty why I love my newsreader..... ;-)

>(And on a side note: Is anyone actually using the yEnc mailing list?
>I've not received anything from it so far. 

The list is up and running.
No messages sent to it at all.
I personally prefer the newsgroups for public discussion unless is comes
to "real work".

>The discussion is getting
>more and more specialised for this NG, so we should probably move
>the discussion there some time.)

news.software.nntp has been used for the entire yEnc discussion since
the beginning. But if the regulars here believe that we are misplaced
then I'm ready to go.


Concerning your "survey":

I dont believe that votes can help us here.

If I wanted "counts" then I'd post this question 
into 50 newsgroups which use already yEnc.

"Do you want that the free and public domain yEnc does also replace 
WinRAR, WinAce and all Splitters permitting one step sending/receiving
and finally stopps the confusion with external tools ?" 

Compression is used every day for most large binaries (movies, CDs).


Perhaps a compromise:

The yEnc-draft does also give recommendations for subject lines
(which are not a part of the encoding itself) - and perhaps one day
for the MIME-embedding.
Perhaps we could add the compression as a similar "recommendation".
Then it would be on the "newsreader-level" rather than in the inner
encoding.

-- 
Juergen

Re: [yEnc] Survey time! (Compression or not?)
#56731
Author: J.B. Moreno
Date: Thu, 21 Feb 2002 19:08
33 lines
2518 bytes
In article <20020220230116.405$a3@newsreader.com>,
 Curt Welch <curt@kcwc.com> wrote:

> "J.B. Moreno" <planb@newsreaders.com> wrote:
> >  Liyang Hu <newsgroups@nerv.cx> wrote:
> >
> > > Compression or not?
> >
> > Not as part of the encoding.
> 
> Why not?

A couple of reasons -- most of the data will be compressed already,
and if it's not then it's easy to add that as an extra, transparent,
step (it's been built into the last 2 or 3 mail clients I've used,
and except for fiddling with the defaults now and again, I don't have
to do anything other than drag the file onto the area that says
"Attachments").  So, it's just as easy to have compression as part of
the process, but not part of the encoding, with the advantages that
brings.

Also, the main argument *for* compression is the potential overhead
when a file has an unusual number of bytes that need to be escaped, and
while that is theoretically possible, I don't think it's a big enough
concern to complicate (or even change) the encoding method.

If it'd had a simple RLE for escaped characters as part of the original
draft, I wouldn't have argued against it (in fact I mentioned it as a
possibility), but I think it's main advantage would be that it would
help avoid arguments such as "if the file consists of nothing but
escaped characters, it'll be 100% larger than the original".  Which
while a worthwhile goal, isn't worth redoing what's already been done.
Re: [yEnc] Survey time! (Compression or not?)
#56737
Author: Curt Welch
Date: Thu, 21 Feb 2002 20:26
91 lines
5436 bytes
Jeremy <jeremy@exit109.com> wrote:
> Curt Welch <curt@kcwc.com> wrote:
>
> >>> Compression or not?
> >>
> >> Not as part of the encoding.
> >
> > Why not?
>
> Because it's stupid.

I figured you might be looking at it like that. :)

> Most of the things posted as binaries are already
> compressed, so an additional compression step would be wasteful and may
> actually make the resulting post larger in many cases.

I was just looking over the zlib stuff (www.zlib.org).  They designed the
algorithm to limit the worse case expansion by allowing a pass-though mode.
The algorithm works on blocks, and when it finds it can't compress the
block, it's just marks it as uncompressed.  The overhead for the "mark" is
5 bytes per 32K block.  That less than .02%. (not 2% but .02%).

zlib seems to be bascially the same code a gzip (thought I'm unclear as to
the differences).

But taking a 56725 byte jpg off of usenet and running it though gzip, I get
a a file which is 301 bytes smaller.  A .5% compression on a file which was
already compressed.

Taking a 3.3 MB mp3 files off of usenet and running it though gzip, it
reduces the file by 46505 bytes.  That's over a 1% savings.

So I think your fear about "may make the file larger" is probably
unfounded.

It may be larger for some files, but by only 5 bytes per 32K worse case.

> Those few things
> that aren't already compressed can and should easily be compressed
> outside of the encoding step.

If it's a standard part of the system, then users will never have to bother
with the extra steps "outside" of their newsreader.

The problem with doing it outside of the encoding is that people will do it
many different ways.  Some will use zip, some will use gzip, or rar, etc.
It's all a function of what that user has access to and works best for him.

If we were to take something like the zlib work and make that a standard,
then everyone that has a yEnc compatibale newsreader will have the correct
tool for decompressing and not have to go to the trouble of finding a copy
of the right tool, or moving files to a machine which has the right tool
just so you can decompress it.

The problem with having to compress the file every time however is that it
prevents the client from knowing important things like the total number of
bytes before the file is posted.  To get that stuff (and correctly
calculate part sizes and number of parts) requires the user posting the
file to compress the file before hand.  For large files which really don't
need compressing (like mp3 files) that would sure be a pain.  And if you
are short on disk space, might not even be possible to compress and save a
copy of the compressed version.

So it might be wise to make the compression a well defined part of the
standard, but optional.  So the person posting would always have the option
of letting the posting client compress using the yenc standard way of
compressing, but if they knew compressing was just a waste of time, then
they could skip it.  But then, people reading the posts would never have to
go find the "correct" compression tool to decode the post.  The file name
would still be picture.bmp instead of picture.zip or picture.gz, the yEnc
headers would simply enclude an extra keyword to show it was was compressed
so all that could be hidden from the users trying to get the file.

I don't think this should be thought of as only an "encoding". It's a
standard for how binary files should be posted on usenet.  And because
compression is so important for usenet, I think it makes a lot of sense to
consider making the compression step part of the standard.

zlib sure looks like the solution to the problem as well because it's
availbale on a wide range of platforms and it is free from any license
restrictions and it seems to work very well for this type of application
(with the included limits on worse case expansion etc).

More thought and testing has to be put into this, but I think it would be a
mistake to write it off so quickly.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56738
Author: Curt Welch
Date: Thu, 21 Feb 2002 20:36
40 lines
2901 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <20020220230116.405$a3@newsreader.com>,
>  Curt Welch <curt@kcwc.com> wrote:
>
> > "J.B. Moreno" <planb@newsreaders.com> wrote:
> > >  Liyang Hu <newsgroups@nerv.cx> wrote:
> > >
> > > > Compression or not?
> > >
> > > Not as part of the encoding.
> >
> > Why not?
>
> A couple of reasons -- most of the data will be compressed already,
> and if it's not then it's easy to add that as an extra, transparent,
> step (it's been built into the last 2 or 3 mail clients I've used,
> and except for fiddling with the defaults now and again, I don't have
> to do anything other than drag the file onto the area that says
> "Attachments").  So, it's just as easy to have compression as part of
> the process, but not part of the encoding, with the advantages that
> brings.

What compression algorithm does your mail client use?  How do you know
the person reading the mail will have acess to the same system?

You can't make it transparent if the compression algorithm isn't
a standard which all newsreaders had built in support for.  As long
as we are asking them to add built-in support for a new encoding, why
not try to add build-in support for a standard compression
system as well?

One reason you wouldn't want to do it is if you can't agree on what
compression system to use.  But the zlib stuff sure looks like it
may be the ideal solution to that problem.  zlib BTW was done by the
same guys who wrote PKZIP and gzip (it seems).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56741
Author: Jeremy
Date: Thu, 21 Feb 2002 21:15
16 lines
1493 bytes
Curt Welch <curt@kcwc.com> wrote:

> zlib sure looks like the solution to the problem as well because it's
> availbale on a wide range of platforms and it is free from any license
> restrictions and it seems to work very well for this type of application
> (with the included limits on worse case expansion etc).

Yeah, but how cross-platform is it *really*?  Does it deal with HFS+ files
with resource forks?  I just checked, and gzip definitely does not.  It is,
therefore, unsuitable for use as "a standard for how binary files should be
posted on Usenet", because it doesn't work properly as-is for the #2 consumer
computer platform.

-- 
Jeremy  |  jeremy@exit109.com
Re: [yEnc] Survey time! (Compression or not?)
#56744
Author: Curt Welch
Date: Thu, 21 Feb 2002 22:06
38 lines
3306 bytes
Jeremy <jeremy@exit109.com> wrote:
> Curt Welch <curt@kcwc.com> wrote:
>
> > zlib sure looks like the solution to the problem as well because it's
> > availbale on a wide range of platforms and it is free from any license
> > restrictions and it seems to work very well for this type of
> > application (with the included limits on worse case expansion etc).
>
> Yeah, but how cross-platform is it *really*?  Does it deal with HFS+
> files with resource forks?  I just checked, and gzip definitely does not.
> It is, therefore, unsuitable for use as "a standard for how binary files
> should be posted on Usenet", because it doesn't work properly as-is for
> the #2 consumer computer platform.

It's ported to both Mac OS and Mac OS X.  It works fine for both platforms.
zlib is ported to everything useful including stuff like Palm OS and the
BeOS. There are source versions or interfaces available for C++, Java,
Perl, Pascal, Python, Tcl, Delphi, and others.  You couldn't ask for a more
portable or well accepted compresion algorithm.

zlib is NOT a file archive tool like zip or tar.  It's a binary stream
compression algorithm.  It's not a command line tool at all, it's a set of
license free open source compression routines.  What you ask about resource
forks is totaly unrelated to whether zlib is useable for compression on
Usenet.  It would work fine for binhex encoded mac files for example. It
would work great for that.

If you want to support posting native mac files with yenc, the compression
algoritmm isn't what's keeping it from working.  It's the fact that the
encoding has no support for it.  If you want support for native
resource/data fork Mac files in yEnc, then you need to add that to yEnc.
zlib would still work fine for compressing the two separate data forks of
the Mac files once you solved the problem at the encoding level.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56745
Author: Francois Petillon
Date: Thu, 21 Feb 2002 22:10
21 lines
2120 bytes
Curt Welch a �crit :
> > Those few things
> > that aren't already compressed can and should easily be compressed
> > outside of the encoding step.
> If it's a standard part of the system, then users will never have to bother
> with the extra steps "outside" of their newsreader.

Then make a newsreader that manage compression automatically.

> The problem with doing it outside of the encoding is that people will do it
> many different ways.  Some will use zip, some will use gzip, or rar, etc.
> It's all a function of what that user has access to and works best for him.

You will still need an archiver : compression is not enough
for what you wanna do. And you have to add redundant parities
to avoid having to repost when a few articles are missing.

This is becoming to be really complex for a single encoder...

  Fran�ois
Re: [yEnc] Survey time! (Compression or not?)
#56746
Author: Liyang Hu
Date: Thu, 21 Feb 2002 22:32
26 lines
2174 bytes
Curt Welch <curt@kcwc.com> wrote:
> zlib is NOT a file archive tool like zip or tar.  It's a binary stream
> compression algorithm.  It's not a command line tool at all, it's a set of
> license free open source compression routines.  What you ask about resource
> forks is totaly unrelated to whether zlib is useable for compression on
> Usenet.  It would work fine for binhex encoded mac files for example. It
> would work great for that.

s/binhex/uuencode/ or s/binhex/Base64/

See if your last sentence still makes sense ...

> If you want to support posting native mac files with yenc, the
> compression algoritmm isn't what's keeping it from working.  It's
> the fact that the encoding has no support for it.

Not many things outside of MacOS has support for it. Which is why OS
X has moved to a directory based structure instead of resource
forks.

mata ne,
/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| HELLO KITTY gang terrorizes town, family STICKERED to death!           |
Re: [yEnc] Survey time! (Compression or not?)
#56751
Author: Curt Welch
Date: Thu, 21 Feb 2002 22:57
29 lines
2665 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:
> Curt Welch <curt@kcwc.com> wrote:
> > zlib is NOT a file archive tool like zip or tar.  It's a binary stream
> > compression algorithm.  It's not a command line tool at all, it's a set
> > of license free open source compression routines.  What you ask about
> > resource forks is totaly unrelated to whether zlib is useable for
> > compression on Usenet.  It would work fine for binhex encoded mac files
> > for example. It would work great for that.
>
> s/binhex/uuencode/ or s/binhex/Base64/
>
> See if your last sentence still makes sense ...

Maybe you mised my point.  Binhex has two functions.  it's both
a uuencode/base64 encoding format and a Mac file archiving format
combined togeher.  It's like .tar.uu for a single file or .zip.uu
for a single file.

It is silly to talk about yEncing a uuencoded file, but it's not silly
to talk about compressing and then yencing a bin hex file because
it is one way to preserve not only the dual forks of a Mac file but
a little bit else as well (If I remeber binhex correctly but it's
been 20 years since I had to write code for it so my memory may be
off).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56753
Author: Jeremy
Date: Thu, 21 Feb 2002 23:11
30 lines
2299 bytes
Curt Welch <curt@kcwc.com> wrote:

> zlib is NOT a file archive tool like zip or tar.  It's a binary stream
> compression algorithm.  It's not a command line tool at all, it's a set of
> license free open source compression routines.  What you ask about resource
> forks is totaly unrelated to whether zlib is useable for compression on
> Usenet.  It would work fine for binhex encoded mac files for example. It
> would work great for that.

Okay, so you're not advocating simply adding compression on top of the
existing encoding.  You actually want to create a "standard way to post
binaries to Usenet".  That's fine, but frankly, I don't think that yEnc
is suitable to be that standard.

> If you want to support posting native mac files with yenc, the compression
> algoritmm isn't what's keeping it from working.  It's the fact that the
> encoding has no support for it.  If you want support for native
> resource/data fork Mac files in yEnc, then you need to add that to yEnc.

Well, right.  And if you want a standard way to post binaries to Usenet,
then it should support things like resource forks.  One reason I don't
think yEnc is suitable to be that standard (though not the main reason).

If you want a standard binary posting method, then let's talk about a
standard binary posting method, not about yEnc.  I don't think that's
a bad idea at all.

-- 
Jeremy  |  jeremy@exit109.com
Re: [yEnc] Survey time! (Compression or not?)
#56755
Author: Liyang Hu
Date: Thu, 21 Feb 2002 23:12
64 lines
3989 bytes
Curt Welch <curt@kcwc.com> wrote:
> zlib seems to be bascially the same code a gzip (thought I'm
> unclear as to the differences).

gzip is the program users use. zlib is the library developers use.
The developers of gzip uses zlib.

>> Those few things that aren't already compressed can and should
>> easily be compressed outside of the encoding step.
> If it's a standard part of the system, then users will never have
> to bother with the extra steps "outside" of their newsreader.

Point is, you're forcing a shite standard on them.

Face it, the algorithm used by zlib is well out of date now. One of
its design decisions was to avoid infringing on patents, and as a
result, it had to make several compromises. It's fine as an every
day compressor, because let's face it, that extra 1% isn't exactly a
difference between life and death. But for certain applications, you
do need the best compression you could possibly get -- anyone who
has had to download the latest Linux kernel sources over a 56k modem
will know what I'm about to point out next: compared to eg. a 28.4MB
gzip'd tarball, the corresponding bzip2'd tarball is nearly 6MB
smaller. You tell me which one I would pick to download.

FYI: The research paper describing the Burrows-Wheeler transform was
only published in 1994. libbz2 was written maybe three, or four
years after that.

Leading on from the last point, here's a Real Life example: Look at
the tar format -- it's, in a way, an encoding for a group of files;
that's all it needs to do, and that's all it does. You then compress
the tarball with gzip, or bzip2, or any other compressor you feel
like on that day.

> If we were to take something like the zlib work and make that a
> standard, then everyone that has a yEnc compatibale newsreader
> will have the correct tool for decompressing and not have to go to
> the trouble of finding a copy of the right tool,

There /is/ no right tool. Only better or worse tools.

> So it might be wise to make the compression a well defined part of
> the standard, but optional.

I think you're trying to combine two separate, well-defined
`standards'. Define a file format that utilises both standards if
you must, but let's try and keep the two `standards' separate.

(And there's no reason why you couldn't just use the existing gzip
format for compression.)

> More thought and testing has to be put into this, but I think it
> would be a mistake to write it off so quickly.

It would be a mistake to take it as the solution that solved all
your problems too quickly^W^W as well. ^_-

/Liyang
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
| There are two major products that came from Berkeley: LSD & UNIX.      |
| We don't believe this to be a coincidence.       -- Jeremy S. Anderson |
Re: [yEnc] Survey time! (Compression or not?)
#56756
Author: Jeremy
Date: Thu, 21 Feb 2002 23:14
17 lines
1524 bytes
Curt Welch <curt@kcwc.com> wrote:

> It is silly to talk about yEncing a uuencoded file, but it's not silly
> to talk about compressing and then yencing a bin hex file because
> it is one way to preserve not only the dual forks of a Mac file but
> a little bit else as well (If I remeber binhex correctly but it's
> been 20 years since I had to write code for it so my memory may be
> off).

I believe it preserves all of the other metadata in addition to the
resource fork (there is a lot more metadata for an HFS+ file than for,
say, a UFS file, including file type, creator, name-lock, invisible,
etc).

-- 
Jeremy  |  jeremy@exit109.com
Re: [yEnc] Survey time! (Compression or not?)
#56762
Author: Curt Welch
Date: Thu, 21 Feb 2002 23:39
68 lines
4009 bytes
Liyang Hu <newsgroups@nerv.cx> wrote:
> Curt Welch <curt@kcwc.com> wrote:
> > zlib seems to be bascially the same code a gzip (thought I'm
> > unclear as to the differences).
>
> gzip is the program users use. zlib is the library developers use.

Yeah, I knew that.  I was talking about differences in the data format
or the compression algorithm which there seems like there may be
some.

> The developers of gzip uses zlib.

That I wasn't clear on.

> >> Those few things that aren't already compressed can and should
> >> easily be compressed outside of the encoding step.
> > If it's a standard part of the system, then users will never have
> > to bother with the extra steps "outside" of their newsreader.
>
> Point is, you're forcing a shite standard on them.

That's a valid issue (even though I don't believe it is a shite standard)
But, as you say...

> It's fine as an every
> day compressor, because let's face it, that extra 1% isn't exactly a
> difference between life and death.

The point of including compression is to make it easy to get resonable good
compression for stuff that needs it without having to go elsewhere and
without having any doubt that the people trying to decode the file will
have easy access to the tools required.

Including a standard "every day compressor" would make the system a lot
more powerful while at the same time not force anyone to use the compresor
for those applications (like your tarball example) that needed to be done a
better way.

> I think you're trying to combine two separate, well-defined
> `standards'.

Of course I am.  But I believe it's a combination that is valuable.

> (And there's no reason why you couldn't just use the existing gzip
> format for compression.)

You can't use gzip source in a commercial application even if you could
clone the code and use the same format.  Now if there is something simple
we could do to make zlib produce byte for byte compatable gzip files
and allow people that have yEnc support but not a version which supported
compression, to use gzip to uncompress the file, that would be wise to
do.

> > More thought and testing has to be put into this, but I think it
> > would be a mistake to write it off so quickly.
>
> It would be a mistake to take it as the solution that solved all
> your problems too quickly^W^W as well. ^_-

True.  I'm not convenced it's the right way to go. I'm mostly just trying
to stop people from throwing the idea out the window without giving it
some thought.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56767
Author: Russ Allbery
Date: Fri, 22 Feb 2002 00:40
36 lines
2828 bytes
Curt Welch <curt@kcwc.com> writes:
> Liyang Hu <newsgroups@nerv.cx> wrote:

>> (And there's no reason why you couldn't just use the existing gzip
>> format for compression.)

> You can't use gzip source in a commercial application even if you could
> clone the code and use the same format.  Now if there is something
> simple we could do to make zlib produce byte for byte compatable gzip
> files and allow people that have yEnc support but not a version which
> supported compression, to use gzip to uncompress the file, that would be
> wise to do.

I don't think you realize what zlib is.  zlib is the compression portions
of gzip under a wide-open license.  The output of zlib *is* a gzip file.
There is no difference.

I have no idea how to get zlib to generate a file that gzip *can't* read.
I'm not sure it's possible.

gzip is still the best choice, in my opinion, for everyday compression.
bzip2 gets slightly better compression and takes ten times as long.  The
ZIP format combines an archive format with a compression format, and is
therefore a more complicated beast.

(I definitely don't think that compression should be included as part of
the encoding, however.  I think we're very much straying into the
"reinventing MIME poorly" territory now -- well, I thought that was true
from the moment that multipart handling got added.)

-- 
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] Survey time! (Compression or not?)
#56768
Author: Liyang Hu
Date: Fri, 22 Feb 2002 00:58
79 lines
4270 bytes
Curt Welch <curt@kcwc.com> wrote:
>> It's fine as an every day compressor, because let's face it, that
>> extra 1% isn't exactly a difference between life and death.
> The point of including compression is to make it easy to get
> resonable good compression for stuff that needs it

Is mediocrity really a good thing?

> without having to go elsewhere and without having any doubt that
> the people trying to decode the file will have easy access to the
> tools required.

Point taken. If only the posters of yEnc'd files had realised that
not all people who are trying to decode the file will have easy
access to the tools required. (You know, this being the reason why I
wrote yydecode in the first place?)

>> I think you're trying to combine two separate, well-defined
>> `standards'.
> Of course I am.  But I believe it's a combination that is
> valuable.

PGP (and GPG?) uses it to increase entropy in the plaintext before
enciphering it. That's a valuable combination. yEnc might want to
compress files to even out the character distribution (and
compression being one of several methods to this end), that /might/
be another valuable combination.

>> (And there's no reason why you couldn't just use the existing
>> gzip format for compression.)
> You can't use gzip source in a commercial application even if you
> could clone the code and use the same format.

Are you sure? Check your facts again -- I know this is not true[0].

> Now if there is something simple we could do to make zlib produce
> byte for byte compatable gzip files

You mean, like use the same format?

> and allow people that have yEnc support but not a version which
> supported compression, to use gzip to uncompress the file, that
> would be wise to do.

If all it did was the equivalent of:

$ gzip --quick file
$ yenc file.gz
$ [insert your favorite news client]:: post file ::

and say, I had a decoder that didn't implement compression, and I
could do:

$ ydec message-body.txt
$ gunzip file.gz

then I would consider that acceptable. (But still not a great idea.)

>> > More thought and testing has to be put into this, but I think
>> > it would be a mistake to write it off so quickly.
>> It would be a mistake to take it as the solution that solved all
>> your problems too quickly^W^W as well. ^_-
> True.  I'm not convenced it's the right way to go.

> I'm mostly just trying to stop people from throwing the idea out
> the window without giving it some thought.

And I'm concerned about how people are talking about removing the
need for WinRAR/bzip2/WinZIP/parchive et c.! They'll always be much
better at the job than what we'll come up with, mainly because
compression is not our main focus.

/Liyang
[0] You want to tell me WinZIP is not a commercial application now? ^_-
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
|  A [programming] language that doesn't affect the way you think        |
|  about programming is not worth knowing.                               |
Re: [yEnc] Survey time! (Compression or not?)
#56769
Author: J.B. Moreno
Date: Fri, 22 Feb 2002 02:08
46 lines
3354 bytes
In article <20020221153605.804$xd@newsreader.com>,
 Curt Welch <curt@kcwc.com> wrote:

> "J.B. Moreno" <planb@newsreaders.com> wrote:
-snip jb says no built in compression
-snip curt asks why not-
> > A couple of reasons -- most of the data will be compressed already,
> > and if it's not then it's easy to add that as an extra, transparent,
> > step (it's been built into the last 2 or 3 mail clients I've used,
> > and except for fiddling with the defaults now and again, I don't have
> > to do anything other than drag the file onto the area that says
> > "Attachments").  So, it's just as easy to have compression as part of
> > the process, but not part of the encoding, with the advantages that
> > brings.
> 
> What compression algorithm does your mail client use?  How do you know
> the person reading the mail will have acess to the same system?

Current client (OE) uses the stuffit engine (comes with system).  As
for how do I know the person receiving it can handle it?  I turn it off
whenever I'm sending something to a non-mac user (I'd prefer to have
the option of using another compression method, but what can you expect
from OE).

> You can't make it transparent if the compression algorithm isn't
> a standard which all newsreaders had built in support for.  As long
> as we are asking them to add built-in support for a new encoding, why
> not try to add build-in support for a standard compression
> system as well?
>
> One reason you wouldn't want to do it is if you can't agree on what
> compression system to use.  But the zlib stuff sure looks like it
> may be the ideal solution to that problem.  zlib BTW was done by the
> same guys who wrote PKZIP and gzip (it seems).

To me, "built in" doesn't mean that decoding has to be part of the
client, just that the expansion happens automatically -- and for that
value of built-in, you don't need to have an agreement on which
compression system to use, because the client can pass it off to
something else.

If someone were to write a client that automatically zipped, or gz'd
binaries, it wouldn't hinder me a bit -- I'd just have my newsreader
pass it off to stuffit expander which "knows" both (and others as
well).
Re: [yEnc] Survey time! (Compression or not?)
#56770
Author: J.B. Moreno
Date: Fri, 22 Feb 2002 02:12
14 lines
1924 bytes
In article <20020221170645.662$tH@newsreader.com>, 
 Curt Welch <curt@kcwc.com> wrote:

> If you want to support posting native mac files with yenc, the compression
> algoritmm isn't what's keeping it from working.  It's the fact that the
> encoding has no support for it.  If you want support for native
> resource/data fork Mac files in yEnc, then you need to add that to yEnc.
> zlib would still work fine for compressing the two separate data forks of
> the Mac files once you solved the problem at the encoding level.

Well, that problem has pretty much been solved for years -- it's called
"macbinary" and it flattens out Mac files so that others can carry them
without loss.  In fact Thoth has a yEnc/MacBinary posting option.
Re: [yEnc] Survey time! (Compression or not?)
#56773
Author: Bill Cole
Date: Fri, 22 Feb 2002 03:21
43 lines
3443 bytes
In article <a53sia$7i4$3@pegasus.csx.cam.ac.uk>,
 Liyang Hu <newsgroups@nerv.cx> wrote:

> > If you want to support posting native mac files with yenc, the
> > compression algoritmm isn't what's keeping it from working.  It's
> > the fact that the encoding has no support for it.
> 
> Not many things outside of MacOS has support for it. Which is why OS
> X has moved to a directory based structure instead of resource
> forks.

For forks, yes, and that's probably good. File meta-data is a different 
issue from forks and it is not so clear that this is going to be 
devolved, since the alternatives amount to not having that meta-data. 
Right now there are 3 MIME standards for encoding Mac files: BinHex, 
AppleSingle, and AppleDouble. All preserve forks and meta-data. Another 
de facto standard for serializing the forks and meta-data into one 
stream is MacBinary, which has some fairly minor version variants. 
AppleSingle is p�tty supported on the Mac side but rarely used. 
AppleDouble is very widely supported because non-Mac systems that 
understand MIME and Base64 can at least pull the data fork  and the 
resource fork+meta-data out as distinct streams. Just about anything on 
the Mac supports MacBinary but it is purely a serializing format, not a 
transfer encoding. BinHex oddly may be the most widely supported 
encoding for Mac files, but it is technically pretty lame. 

Ideally, an encoding would be purely an encoding. Support for anything 
other than a single stream should be distinct. A very good standard for 
serializing the elements of Mac files already exists: MacBinary. Nearly 
any Mac program that handles file transfer of any sort handles MacBinary 
already. A suitable answer to how yEnc should deal with non-flat files 
is that it doesn't: it encodes a single stream.  How to serialize the 
parts of a Mac file (or any file) into a single stream should be 
specific to the home environment of that file format. For Mac users I 
expect that user software would provide the sort of options that most 
already do, and support MacBinary plus yEnc or yEnc of just the data 
fork to get data files to other platforms.

-- 
Bill Cole
I don't speak for my current employer, much less my former ones. 
That disclaimer will not change the minds of a few lunatics, of course... 
Re: [yEnc] Survey time! (Compression or not?)
#56774
Author: Bill Cole
Date: Fri, 22 Feb 2002 03:40
32 lines
2403 bytes
In article <1014333273.253752@ok-corral.gunslinger.net>,
 Jeremy <jeremy@exit109.com> wrote:

> Curt Welch <curt@kcwc.com> wrote:
> 
> > It is silly to talk about yEncing a uuencoded file, but it's not silly
> > to talk about compressing and then yencing a bin hex file because
> > it is one way to preserve not only the dual forks of a Mac file but
> > a little bit else as well (If I remeber binhex correctly but it's
> > been 20 years since I had to write code for it so my memory may be
> > off).
> 
> I believe it preserves all of the other metadata in addition to the
> resource fork (there is a lot more metadata for an HFS+ file than for,
> say, a UFS file, including file type, creator, name-lock, invisible,
> etc).

And in fact, BinHex does a 2nd-rate job. It's sorta the uucode of the 
Mac world: a way to roll together the most important (but not all) 
metadata and file content and encode it in a 6-bit character set in a 
way no one on other platforms can use. With cute delimiting. At least 
there is only ONE character table used. 

MacBinary III is a better serializing format that actually includes all 
the HFS+ metadata and could be extended even further if the metadata 
grows. It is NOT an encoding though.

-- 
Bill Cole
I don't speak for my current employer, much less my former ones. 
That disclaimer will not change the minds of a few lunatics, of course... 
Re: [yEnc] Survey time! (Compression or not?)
#56775
Author: Curt Welch
Date: Fri, 22 Feb 2002 03:40
73 lines
5132 bytes
Russ Allbery <rra@stanford.edu> wrote:
> I don't think you realize what zlib is.  zlib is the compression portions
> of gzip under a wide-open license.  The output of zlib *is* a gzip file.
> There is no difference.
>
> I have no idea how to get zlib to generate a file that gzip *can't* read.
> I'm not sure it's possible.

I knew they were closely related, but scanning a lot of stuff on the site I
didn't see anything that made it clear they were identical.  But I'm
beginning to catch on. :)

Reading some more, I now think I see the confusion I was running into.

One comment from the site is what made me think they were not byte for byte
compatible.  It read: "The library also supports reading and writing files
in gzip (.gz) format with an interface similar to that of stdio."

It turns out I read that correctly. zlib and zip are NOT the same.

zlib and gzip are bascially all the same, but, zlib compression format is
NOT the same as gzip _file_ format.  The gzip file format is the zlib
compressed data format wrapped with extra headers and a CRC-32.

The zlib format is documented in rfc1950.  It is a standard for wrapping a
compressed data stream with some headers and an Adler-32 crc.  The default
compression method is the "deflate" method described in rfc1951.

The zlib in-core compression routines I believe generate a stream which has
the rfc1950 headers and uses the rfc1951 deflate compression algorithm.

The gzip _file_ format is documented in rfc1952.  It acts like a simple
file archive format and is a wrapper for the zlib data format.  It adds
headers which includes a 2 byte magic number, and the file size, and can
include a file name, a date, and a comment field, and then adds a CRC32
checksum at the end. This allows you to combine multiple compressed .gz
files together simply be concatenation. This is explained on the man page
but I never noticed it.

So, if you take the zlib compression routines, and use them to compress a
file, and write it disk, gzip WILL NOT be able to read it.  You have to add
the standard gzip headers in front of that and the CRC to the end before it
will become a zgip file.

The zlib library includes a set of routines for reading and writing gzip
files, however, at first glance, there seems to be no way to create a gzip
format file in memory with those routines or with any other routines which
are part of zlib.

So, if one were to use the zlib compression routines in an yEnc
encodor/decoder the simple way would be to use only the zlib format data
stream.  That however is not the same as a gzip format data stream so to
make it gzip compatiable, we would have to add the correct headers and the
trailing CRC-32 which gzip uses.

So, as far as I can tell, most of what you guys were saying is both right
and wrong.  zlib and gzip are all the same, but, the zlib _compression_
routines do not produce a gzip compatible data stream.  You do have to work
a bit harder than that if you wanted to make the yEnc data stream gzip
compatible as well as zlib compatible. But of course, gzip is simply adding
meta information which yenc is already including in it's headers, so there
would be a bit of redundancy there anyway.

Now that I understand that zlib and gzip are really just the same thing,
the best way to do this is simply be to let clients do it if they want and
the format and effect would end up being exactly the same as gziping the
file and then yencoding it.  Which of course is what all of you have been
saying was the obviously correct way to do it. :)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56778
Author: Russ Allbery
Date: Fri, 22 Feb 2002 05:35
39 lines
2924 bytes
Curt Welch <curt@kcwc.com> writes:

> It turns out I read that correctly. zlib and zip are NOT the same.

That's correct.

> zlib and gzip are bascially all the same, but, zlib compression format
> is NOT the same as gzip _file_ format.  The gzip file format is the zlib
> compressed data format wrapped with extra headers and a CRC-32.

You can do that if you want, if you intentionally use the low-level zlib
routines, but the standard zlib calls write gzip files.  It's basically
the same as the output of gzip.  I use this all the time as part of my
job; I know it's true.

gzip has absolutely nothing to do with zip, however.

> The gzip _file_ format is documented in rfc1952.  It acts like a simple
> file archive format and is a wrapper for the zlib data format.  It adds
> headers which includes a 2 byte magic number, and the file size, and can
> include a file name, a date, and a comment field, and then adds a CRC32
> checksum at the end. This allows you to combine multiple compressed .gz
> files together simply be concatenation. This is explained on the man
> page but I never noticed it.

zlib writes RFC 1952 files, although it doesn't include the timestamp
information.  

> So, if you take the zlib compression routines, and use them to compress
> a file, and write it disk, gzip WILL NOT be able to read it.

Nope.  Try it.

-- 
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] Survey time! (Compression or not?)
#56781
Author: Curt Welch
Date: Fri, 22 Feb 2002 07:13
52 lines
3510 bytes
Russ Allbery <rra@stanford.edu> wrote:
> Curt Welch <curt@kcwc.com> writes:
>
> > It turns out I read that correctly. zlib and zip are NOT the same.
>
> That's correct.
>
> > zlib and gzip are bascially all the same, but, zlib compression format
> > is NOT the same as gzip _file_ format.  The gzip file format is the
> > zlib compressed data format wrapped with extra headers and a CRC-32.
>
> You can do that if you want, if you intentionally use the low-level zlib
> routines, but the standard zlib calls write gzip files.  It's basically
> the same as the output of gzip.  I use this all the time as part of my
> job; I know it's true.

Ok, which low level routines?  compress()/uncompress() or deflate()/
inflate() etc?

It's obvious the gz* routines will be creating gzip file format.  What does
compress() create and what does deflate() create?  I assumed both would be
the same and both would be zlib format?

> gzip has absolutely nothing to do with zip, however.

That was just a typo on my part.  I was trying to say gzip.

> > So, if you take the zlib compression routines, and use them to compress
> > a file, and write it disk, gzip WILL NOT be able to read it.
>
> Nope.  Try it.

I was afraid my assumptions would be wrong agaon.  Ok, Ok, I'll try it...

No, it looks like I was right.  The compress() and uncompress() zlib
functions are not returning data in gzip format.  It looks like zlib
format.

If I compress() "test\n" I get 13 bytes of compressed data.  And when I run
those 13 bytes though uncompress() I get back my 5 bytes.  But when I save
those to a file and try to run gunzip it just says "not in gzip format".

But if I use the zlib routines for writing a gzip format file, it produces
a 25 byte file which gunzip does understand.

Sure looks to me like my guess about what the zlib routines are doing is
correct.  Does it work different for you?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56787
Author: Russ Allbery
Date: Fri, 22 Feb 2002 07:57
49 lines
3460 bytes
Curt Welch <curt@kcwc.com> writes:
> Russ Allbery <rra@stanford.edu> wrote:

>> You can do that if you want, if you intentionally use the low-level
>> zlib routines, but the standard zlib calls write gzip files.  It's
>> basically the same as the output of gzip.  I use this all the time as
>> part of my job; I know it's true.

> Ok, which low level routines?  compress()/uncompress() or deflate()/
> inflate() etc?

Right.

> It's obvious the gz* routines will be creating gzip file format.  What
> does compress() create and what does deflate() create?  I assumed both
> would be the same and both would be zlib format?

I would assume that they're generating the compressed streams without the
headers, yes.  (I find your term "zlib format" to be extremely confusing,
since zlib creates gzip files when you tell it to create a file.)

> No, it looks like I was right.  The compress() and uncompress() zlib
> functions are not returning data in gzip format.  It looks like zlib
> format.

Why are you using those functions rather than using the gzopen() /
gzwrite() interface?

I don't understand what you're trying to argue.  First you said that zlib
wasn't the same compression format as gzip, then you said that zlib
couldn't write files that gzip can read, and now you're saying that if you
intentionally use functions that aren't interoperable with gzip, they're
not interoperable with gzip.  Well, the first two statements aren't true,
but the last statement is, certainly.  But I really no longer understand
your point.

My point is that if you want to generate something that gzip can
decompress, zlib works just great.  You seem to be continuing to disagree
with me, and I'm extremely confused about the grounds for your
disagreement.

Like I said, I have programs that *do* this.  It works fine.

-- 
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] Survey time! (Compression or not?)
#56807
Author: Curt Welch
Date: Fri, 22 Feb 2002 17:09
110 lines
6542 bytes
Russ Allbery <rra@stanford.edu> wrote:
> Curt Welch <curt@kcwc.com> writes:
> > Russ Allbery <rra@stanford.edu> wrote:
>
> >> You can do that if you want, if you intentionally use the low-level
> >> zlib routines, but the standard zlib calls write gzip files.  It's
> >> basically the same as the output of gzip.  I use this all the time as
> >> part of my job; I know it's true.
>
> > Ok, which low level routines?  compress()/uncompress() or deflate()/
> > inflate() etc?
>
> Right.
>
> > It's obvious the gz* routines will be creating gzip file format.  What
> > does compress() create and what does deflate() create?  I assumed both
> > would be the same and both would be zlib format?
>
> I would assume that they're generating the compressed streams without the
> headers, yes.  (I find your term "zlib format" to be extremely confusing,
> since zlib creates gzip files when you tell it to create a file.)

The terminology is not mine.  It comes from the RFCS:

     RFC 1950 - ZLIB Compressed Data Format Specification version 3.3
     RFC 1952 - GZIP file format specification version 4.3

zlib is a set set of compression routines.  The compress() and uncompress()
routines produce RFC 1950 format data.  That data is not gzip compatiable.

It also includes a set of stdio-like wrappers that can produce .gz files
in the RFC 1952 gzip format.  But those only seem to work when writting
to disk, not when trying to do in-core compression which is what zlib does.

> > No, it looks like I was right.  The compress() and uncompress() zlib
> > functions are not returning data in gzip format.  It looks like zlib
> > format.
>
> Why are you using those functions rather than using the gzopen() /
> gzwrite() interface?

Do you remember the context of this discussion?  It was about including
compression in the yEnc encoding.  When you do that, you tend to write
code which reads a file a buffer at a time, and writes out the encoded
version to the article you are creating. When you add compression, you read
a file a buffer at a time, compress the buffer (in memory), then you encode
it, then you write it to the article.

How do you do that with zlib without using compress() and uncompress()?

How do make zlib do that in-core and also create a gzip compatibale data
stream? At first glance, it seems there is no way to do it.  You are forced
to read the uncompresed, file, write out a gzip file to disk, then read
that file, and encoded it to create your article.  Half the point of
including something like the zlib routines in a newsreader is to cut out
the extra step of having to write the compressed file to disk.

> I don't understand what you're trying to argue.

I'm not really arguing anything anymore.  My points started because I
thought zlib was NOT gzip.  It really is. Once I realized that, then, most
the points I was making about using zlib as a part of yEnc don't apply - or
the strengh of that side of the argument is reduced greatly.

Now I'm just trying to help you to understand the semantics of my last
post. :)

> First you said that zlib
> wasn't the same compression format as gzip, then you said that zlib
> couldn't write files that gzip can read,

You are just getting lost in the terminology issues I was picking up from
the RFCs.  I was using the term "zlib format" as it was defined in
the RFC, not the more obvious way that you are thinking about it as
"the format the gz* zlib wrapper routines produce".

> and now you're saying that if
> you intentionally use functions that aren't interoperable with gzip,
> they're not interoperable with gzip.  Well, the first two statements
> aren't true, but the last statement is, certainly.  But I really no
> longer understand your point.

It's all done with mirrors. :)

> My point is that if you want to generate something that gzip can
> decompress, zlib works just great.  You seem to be continuing to disagree
> with me, and I'm extremely confused about the grounds for your
> disagreement.
>
> Like I said, I have programs that *do* this.  It works fine.

This is what I'm having a problem with...

Can you use the zlib routines to produce an in-core gzip compatiable
data stream without writing it do disk?  How?  It looks to me like you
can't.  That is not what I think of as "It works fine".

The gzip format is simple enough that even if my understanding is correct
about what you can and can't do with the zlib routines, it would still be
easy to do what I wanted by hand-crafting the gzip headers and calculating
the CRC by hand.  But that's a lot more complex than just a sequence of
calls to compress() which is what I would expect from a "gzip compression
library" which is why I was trying to point on that even though zlib is the
compression algorithm for gzip, zlib format and gzip format are not exactly
the same thing.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: [yEnc] Survey time! (Compression or not?)
#56811
Author: Russ Allbery
Date: Fri, 22 Feb 2002 18:24
30 lines
2848 bytes
Curt Welch <curt@kcwc.com> writes:

> Do you remember the context of this discussion?  It was about including
> compression in the yEnc encoding.  When you do that, you tend to write
> code which reads a file a buffer at a time, and writes out the encoded
> version to the article you are creating. When you add compression, you
> read a file a buffer at a time, compress the buffer (in memory), then
> you encode it, then you write it to the article.

> How do you do that with zlib without using compress() and uncompress()?

Oh, I understand now.  Sorry for being dense.  :)

zlib is all freely modified code.  It obviously includes the code to
generate the header data that's used by gzip files.  Someone may have to
go find that code in gzwrite() and add an interface to get at it when
you're using compress() and uncompress().  Should be pretty trivial, and
if there's an application for it, I would imagine the zlib maintainers may
welcome such a patch.

You're right, it doesn't look like there's a good way to get at that code
without either using a temporary file or tweaking the zlib interface a
touch, which is a bit strange.

-- 
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] Survey time! (Compression or not?)
#56843
Author: Yume no Hikari
Date: Sat, 23 Feb 2002 11:02
27 lines
2521 bytes
On Wed, 20 Feb 2002 14:31:31 -0700, =-lordsnow-= wrote:

>> Compression or not?
> 
> Compression should ALWAYS be used. But it should NOT be defined in some
> enoders specs what compression it to be used. Like, as if compression
> specs say what encoding to use...
> 
> The two are necesary, but seperate.
To summarize large chunks of this thread (and cut out the zlib/gzip
digression), I'm going to agree with what seems to be the general opinion
and say compression doesn't belong here.  The argument that most Usenet
binary data is already compressed is an accurate one, and one that I think
needs to be supplemented with the fact that compression techniques evolve
like anything else.  Fifteen years ago we all used LZ (compress); ten
years ago it was deflate() (zip 2/gzip/zlib), and it seems now we're
coming into other things.  If we want something that's going to last as a
standard, it seems to me like a better idea to keep it simple (to which
end I'll withdraw some of my prior argument for embedded redundant
parities) and do the job that is immediately in front of us: encapsulate
files in a form suitable for this particular method of transport. 
Compression is better left to other things, as are redundancy
calculations; by keeping these as separate tasks, we can make gradual
adaptations more possible.

-hikari/Joel
Re: [yEnc] Survey time! (Compression or not?)
#56969
Author: Kai Henningsen
Date: Thu, 28 Feb 2002 09:33
29 lines
2312 bytes
rra@stanford.edu (Russ Allbery)  wrote on 21.02.02 in <ylvgcq3q5r.fsf@windlord.stanford.edu>:

> Curt Welch <curt@kcwc.com> writes:

> > No, it looks like I was right.  The compress() and uncompress() zlib
> > functions are not returning data in gzip format.  It looks like zlib
> > format.
>
> Why are you using those functions rather than using the gzopen() /
> gzwrite() interface?

They are *much* more comfortable to use in any case I've needed, except  
when I needed gzip compatibility; and from looking at the docs, they are  
quite obviously the preferred interface.

Frankly, the interface to gzip-compatible files looks like a user- 
requested feature that the maintainers don't really care about.

> I don't understand what you're trying to argue.

I understand it as "the native format of zlib is incompatible with gzip".  
Which is entirely true.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)
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