🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87182

Re: About compression with NNTP

#87182
From: Julien ÉLIE
Date: Sat, 07 Nov 2015 14:23
50 lines
3074 bytes
Hi Michael,

> I have configured the compressor part of zlib like this:
> |
> | deflateInit2(strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 9, Z_DEFAULT_STRATEGY);
>                                                       ^^^
> The negative sign should give a raw data stream without zlib container
> (header, dictionary and checksum).

I was planing to use for INN:

#define MEM_LEVEL 8
#define WINDOW_BITS (-15)      /* Raw deflate. */

deflateInit2(zstream_out, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
              WINDOW_BITS, MEM_LEVEL, Z_DEFAULT_STRATEGY);


As 8 is the default value for MEM_LEVEL, I kept it.  Do you think 9 
would be better to use?

    The memLevel parameter specifies how much memory should be allocated
    for the internal compression state.  memLevel=1 uses minimum memory
    but is slow and reduces compression ratio; memLevel=9 uses maximum
    memory for optimal speed.  The default value is 8.


Also, I see that you use Z_BEST_COMPRESSION (9).

     The compression level must be Z_DEFAULT_COMPRESSION, or between
     0 and 9:  1 gives best speed, 9 gives best compression, 0 gives no
     compression at all (the input data is simply copied a block at a
     time).  Z_DEFAULT_COMPRESSION requests a default compromise
     between speed and compression (currently equivalent to level 6).



Do you plan on changing the compression level depending on the commands 
you send?  It is configurable by the user?
I wonder whether INN should also use 9.  It may consume too many 
resources if hundreds of users are connected.  Or be a parameter for 
news administrators?  (this way, they could deactivate compression if 
wanted, with the 0 value)

-- 
Julien ÉLIE

« Faites le mur, pas la guerre. » (Astérix)

Technical Details
Message-ID: <n1l1h4$4bb$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: <mvjp3s$n0u$1@news.trigofacile.com> <AABWN95ofdEAABgy.A1.flnews@WStation1.micha.freeshell.org> <AABWPOnx3uEAABCC.A1.flnews@WStation3.stz-e.de>

Show Full Headers
Complete Article Headers
Message-ID: <n1l1h4$4bb$1@news.trigofacile.com>
Subject: Re: About compression with NNTP
Date: Sat, 7 Nov 2015 15:23:32 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWN95ofdEAABgy.A1.flnews@WStation1.micha.freeshell.org> <AABWPOnx3uEAABCC.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
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: Sat, 7 Nov 2015 14:23:32 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-233-36.w83-200.abo.wanadoo.fr:83.200.8.36";
 logging-data="4459"; 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: <AABWPOnx3uEAABCC.A1.flnews@WStation3.stz-e.de>
X-Received-Body-CRC: 3568666427
X-Received-Bytes: 3060