Article View: news.software.nntp
Article #56811Re: [yEnc] Survey time! (Compression or not?)
From: Russ Allbery
Date: Fri, 22 Feb 2002 18:24
Date: Fri, 22 Feb 2002 18:24
30 lines
2848 bytes
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.
Technical Details
Message-ID:
<ylu1s9nzm4.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mailReferences:
<a504os$736$6@pegasus.csx.cam.ac.uk> <200220022141483852%planb@newsreaders.com> <20020220230116.405$a3@newsreader.com> <1014270020.729921@ok-corral.gunslinger.net> <20020221152617.647$FV@newsreader.com> <a53ut8$7i4$4@pegasus.csx.cam.ac.uk> <20020221183904.819$lz@newsreader.com> <yleljecpr8.fsf@windlord.stanford.edu> <20020221224023.453$bg@newsreader.com> <ylr8ne6pve.fsf@windlord.stanford.edu> <20020222021334.828$pl@newsreader.com> <ylvgcq3q5r.fsf@windlord.stanford.edu> <20020222120943.799$AG@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <ylu1s9nzm4.fsf@windlord.stanford.edu> Subject: Re: [yEnc] Survey time! (Compression or not?) Date: Fri, 22 Feb 2002 10:24:51 -0800 From: Russ Allbery <rra@stanford.edu> References: <a504os$736$6@pegasus.csx.cam.ac.uk> <200220022141483852%planb@newsreaders.com> <20020220230116.405$a3@newsreader.com> <1014270020.729921@ok-corral.gunslinger.net> <20020221152617.647$FV@newsreader.com> <a53ut8$7i4$4@pegasus.csx.cam.ac.uk> <20020221183904.819$lz@newsreader.com> <yleljecpr8.fsf@windlord.stanford.edu> <20020221224023.453$bg@newsreader.com> <ylr8ne6pve.fsf@windlord.stanford.edu> <20020222021334.828$pl@newsreader.com> <ylvgcq3q5r.fsf@windlord.stanford.edu> <20020222120943.799$AG@newsreader.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 29 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1014402292 5146 171.64.13.23 (22 Feb 2002 18:24:52 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Common Lisp, sparc-sun-solaris2.6) Cancel-Lock: sha1:BkmP0Qhp2BrTQBSy4A7H0CSKaLE=