🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87266

Re: draft-murchison-nntp-compress-02

#87266
From: Julien ÉLIE
Date: Sun, 29 Nov 2015 18:32
40 lines
2917 bytes
Hi Michael,

>> I came across an interoperability issue because of that (I did not
>> always use the same zlib decompression object to decompress the
>> data received in my Python testing script, which led to
>> decompression failures with "invalid distance too far back").
>
> Shouldn't that be dependent on the flush method used by the
> compressor?

I am speaking of an action like inflateReset on a compressor, or having 
two decompressors (they cannot separately decode consecutive compressed 
data that do not have a Z_FULL_FLUSH between).
If Z_SYNC_FLUSH or Z_PARTIAL_FLUSH is used, the problem indeed exists.


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

-- 
Julien ÉLIE

« Aequum est ut cuius participauit lucrum, participet et damnun. »

Technical Details
Message-ID: <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
References: <n229bp$tel$1@news.trigofacile.com> <n3d370$4bg$1@news.trigofacile.com> <AABWWsKcsJ8AAAGM.A1.flnews@WStation1.micha.freeshell.org>

Show Full Headers
Complete Article Headers
Message-ID: <n3fgba$vh4$1@news.trigofacile.com>
Subject: Re: draft-murchison-nntp-compress-02
Date: Sun, 29 Nov 2015 19:32:09 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <n229bp$tel$1@news.trigofacile.com> <n3d370$4bg$1@news.trigofacile.com> <AABWWsKcsJ8AAAGM.A1.flnews@WStation1.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-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 29 Nov 2015 18:32:10 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-294-16.w83-114.abo.wanadoo.fr:83.114.213.16";
 logging-data="32292"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.3.0
In-Reply-To: <AABWWsKcsJ8AAAGM.A1.flnews@WStation1.micha.freeshell.org>
X-Received-Body-CRC: 642037562
X-Received-Bytes: 2903