🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87241

Re: About compression with NNTP

#87241
From: Michael Baeuerle
Date: Wed, 18 Nov 2015 17:38
101 lines
4627 bytes
Julien ÉLIE wrote:
> Michael Bäuerle wrote:
> > Julien ÉLIE wrote:
> > > 
> > > Trying to post this article via Julien's server after importing the new
> > > X.509 certificate ...
> > 
> > First test article with compression ...
> 
> Perfectly well received.  Thanks for the test!

I have now taken a look at the small commands where size increases when
"Z_SYNC_FLUSH" is used between them.

Looks like it is not possible to change the compression level on-the-fly
(without destroying the whole stream and reinitialize a new one).
Have I overlooked something?

Trying to disable the compression completely (Init the compressor with
"Z_NO_COMPRESSION") still increases the size. Looks like it is not the
compression itself, but the sync bits that create the problem.

What helps is to use "Z_PARTIAL_FLUSH" instead of "Z_SYNC_FLUSH" to
push the commands out. This works too, but the state of the compressor
seems to be preserved much better. Now I see approx. factor 2 reduction
in size for a long series of "HEAD" commands:

CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 7 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 7 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 7 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 9 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 12 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 6 compressed bytes
CMPR: -------------------------------
CMPR: Accepted 6 uncompressed bytes
CMPR: Deflating...
CMPR: Flush requested
CMPR: Deflating...
CMPR: Sending 9 compressed bytes
              ^^^^^^^^^^^^^^^^^^
In some cases the size is still increased, but not very often.

For flnews, HEAD is the only command that is send many times (if OVER
capability is not available). For anything else to send that is small,
the increased size shouldn't matter.

Technical Details
Message-ID: <AABWTLHRTacAADB8.A1.flnews@WStation3.stz-e.de>
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: <mvjp3s$n0u$1@news.trigofacile.com> <AABWN95ofdEAABgy.A1.flnews@WStation1.micha.freeshell.org> <AABWPOnx3uEAABCC.A1.flnews@WStation3.stz-e.de> <AABWRcsM7CgAAA0V.A1.flnews@WStation3.stz-e.de> <AABWShRCCtgAABcW.A1.flnews@WStation3.stz-e.de> <n2deh9$9gn$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <AABWTLHRTacAADB8.A1.flnews@WStation3.stz-e.de>
Subject: Re: About compression with NNTP
Date: Wed, 18 Nov 2015 17:38:37 +0000
From: Michael Baeuerle <michael.baeuerle@stz-e.de>
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWN95ofdEAABgy.A1.flnews@WStation1.micha.freeshell.org> <AABWPOnx3uEAABCC.A1.flnews@WStation3.stz-e.de> <AABWRcsM7CgAAA0V.A1.flnews@WStation3.stz-e.de> <AABWShRCCtgAABcW.A1.flnews@WStation3.stz-e.de> <n2deh9$9gn$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
Organization: Groupes francophones par TrigoFACILE
Reply-To: Michael Baeuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 18 Nov 2015 17:38:37 -0000
Injection-Info: news.trigofacile.com; posting-account="test"; posting-host="business-092-079-177-146.static.arcor-ip.net:92.79.177.146";
 logging-data="27464"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: flnews/0.13pre1 (for GNU/Linux)
Cancel-Lock: sha1:we+W4YCLRqEMDPYE5ku0Uz5kq4M=
X-Received-Body-CRC: 1927360320
X-Received-Bytes: 4609