Welcome! Log In Create A New Profile

Advanced

Re: [PATCH v2] Gzip: use zlib to write header and trailer

Maxim Dounin
July 12, 2019 03:30PM
Hello!

On Fri, Jul 12, 2019 at 01:04:51PM +0200, Ilya Leoshkevich wrote:

> # HG changeset patch
> # User Ilya Leoshkevich <iii@linux.ibm.com>
> # Date 1562928188 -7200
> # Fri Jul 12 12:43:08 2019 +0200
> # Node ID 0a056523895149d727a703242f2e2b579cfec9da
> # Parent 97ce2512373d7278f765f587d4cf087065a55e7c
> Gzip: use zlib to write header and trailer
>
> When nginx is used with zlib patched with [1], which provides
> integration with the future IBM Z hardware deflate acceleration, it ends
> up computing CRC32 twice: one time in hardware, which always does this,
> and one time in software by explicitly calling crc32().
>
> crc32() calls were added in changesets 133:b27548f540ad ("nginx-0.0.1-
> 2003-09-24-23:51:12 import") and 134:d57c6835225c ("nginx-0.0.1-
> 2003-09-26-09:45:21 import") as part of gzip wrapping feature - back
> then zlib did not support it.
>
> However, since then gzip wrapping was implemented in zlib v1.2.0.4,
> and it's already being used by nginx for log compression.
>
> This patch replaces hand-written gzip wrapping with the one provided by
> zlib. It simplifies the code, and makes it avoid computing CRC32 twice
> when using hardware acceleration.
>
> [1] https://github.com/madler/zlib/pull/410
>
> v1->v2: Resent in hg format, replaced git mirror commit references to hg
> changeset references in the commit message. The code is unchanged.

[...]

Committed (with minor changes), thanks.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH v2] Gzip: use zlib to write header and trailer

Ilya Leoshkevich 211 July 12, 2019 07:06AM

Re: [PATCH v2] Gzip: use zlib to write header and trailer

Maxim Dounin 145 July 12, 2019 03:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready