Article View: news.software.nntp
Article #87265Re: draft-murchison-nntp-compress-02
From: Michael Baeuerle
Date: Sun, 29 Nov 2015 19:51
Date: Sun, 29 Nov 2015 19:51
49 lines
3609 bytes
3609 bytes
Julien ÉLIE wrote: > Michael Bäuerle wrote: > > > > [...] > > Quoted from "zlib.h": > > | > > | If flush is set to Z_FULL_FLUSH, all output is flushed as with > > | Z_SYNC_FLUSH, and the compression state is reset so that decompression > > | can restart from this point if previous compressed data has been > > | damaged or if random access is desired. Using Z_FULL_FLUSH too often > > | can seriously degrade the compression. > > > > Looks like it should be possible (if we really want it), but in my tests > > the short commands are compressed best with Z_PARTIAL_FLUSH (in this > > case the decompressor must preserve its internal state). > > In the "20151128 prerelease" version of INN, the compression stream > uses Z_NO_FLUSH and Z_SYNC_FLUSH (that also preserves its internal > state). > Do you think it would be better to only use Z_NO_FLUSH and > Z_PARTIAL_FLUSH? I can switch to Z_PARTIAL_FLUSH if it happens to > output fewer bytes than Z_SYNC_FLUSH. I have tested both variants in flnews and Z_PARTIAL_FLUSH was better for small data blocks like commands. I have also looked into an older zlib (1.2.3) header file to compare the declarations: | | #define Z_NO_FLUSH 0 | #define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ | #define Z_SYNC_FLUSH 2 | #define Z_FULL_FLUSH 3 | #define Z_FINISH 4 | #define Z_BLOCK 5 Only the comment is removed (not Z_PARTIAL_FLUSH) in 1.2.8 now. I think this means they have revised their plan and it will stay available in the future. Viewed from the interoperability point, anything except Z_FULL_FLUSH will require some knowledge on the opposite side to work (please correct me if this is wrong). In this case Z_SYNC_FLUSH don't solve the problem (and always using Z_FULL_FLUSH would result in bad compression ratios). But because zlib is so ubiquitous (and NNTP don't require compression to work), IMHO it is acceptable to explicitly define a zlib flush method to be used for the DEFLATE algorithm.
Technical Details
Message-ID:
<AABWW0vIXqsAAEWe.A1.flnews@WStation4.micha.freeshell.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mailReferences:
<n229bp$tel$1@news.trigofacile.com> <n3d370$4bg$1@news.trigofacile.com> <AABWWsKcsJ8AAAGM.A1.flnews@WStation1.micha.freeshell.org> <n3fgba$vh4$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <AABWW0vIXqsAAEWe.A1.flnews@WStation4.micha.freeshell.org> Subject: Re: draft-murchison-nntp-compress-02 Date: Sun, 29 Nov 2015 19:51:10 -0000 From: Michael Baeuerle <michael.baeuerle@gmx.net> References: <n229bp$tel$1@news.trigofacile.com> <n3d370$4bg$1@news.trigofacile.com> <AABWWsKcsJ8AAAGM.A1.flnews@WStation1.micha.freeshell.org> <n3fgba$vh4$1@news.trigofacile.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.(19219).mbox.7z!not-for-mail Newsgroups: news.software.nntp Lines: 47 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=fixed Content-Transfer-Encoding: 8bit X-Trace: individual.net giweulNGT4SmUSgNOzgPmwHe2DvmU5Lc0yZO55OfZOPl8kJxx5 X-Orig-Path: not-for-mail Cancel-Lock: sha1:dEMc8BHWpO8qdTneOFB/FruJSO8= sha1:En6H/kOoMVQMEPNG5b7FADQKsxM= Injection-Date: Sun, 29 Nov 2015 19:51:10 -0000 User-Agent: flnews/0.13pre1 (for AIX) X-Received-Body-CRC: 1359934797 X-Received-Bytes: 3468