GNU bug report logs - #67022
Gzip decompression can be 60% faster using zlib's CRC32

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: gzip; Reported by: Young Mo Kang <kym327@HIDDEN>; dated Thu, 9 Nov 2023 17:42:01 UTC; Maintainer for gzip is bug-gzip@HIDDEN.

Message received at 67022 <at> debbugs.gnu.org:


Received: (at 67022) by debbugs.gnu.org; 14 Mar 2024 18:01:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 14 14:01:18 2024
Received: from localhost ([127.0.0.1]:50567 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rkpOH-0004yr-Jh
	for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:01:17 -0400
Received: from mail-bn8nam12on2094.outbound.protection.outlook.com
 ([40.107.237.94]:23550 helo=NAM12-BN8-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <madler@HIDDEN>) id 1rkpOD-0004ya-98
 for 67022 <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:01:16 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=EopHF36aM1wKrnnmeqd5xGhBpG7zVKECzDr5tKDWP1tIBWI1qSN2vILnMHGhAbBfByLEaVe8/DeHdbcWSfSdek4fcM9PaCFNA/cbk1r0doSkx0x6dFuPSCVfEdnrwzHJ4KFWkog3S2CRQc+MgfKXMq14HmEytQahA3AKKrDJCAk2xPMMsHJhPPUeuYf0A+d/F0Zo/kttE4NAHJi/tokARd4KjFqC2bKmyVrZe08aFjNoSy3M/ppS7vS3nipkF1lwxvvb8mOFGakdq7qtwEYrlu23JUZyf7hHh3hsk52bl+dyp2MjNamwGY+AhbAr69ocNItR41DxB7JuEQuT0ksvmg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=GkfnlawCuOnbP1jjY2iq1D7moIKuDpVAPLDxuKsCtUQ=;
 b=hBzcqJbfksxHv5wjkA0zk34/OjRklHZRd+eyYjG540A9sCHD0vofRtIAn4PpUQjC40xIClCyUhGjeMCo8jiQqwvsg+Q7BP9AdTP5R8jMcBh2cJdhwU40Xzt0jZ36tGrUx93cnzNvOa/AiEEe7BQbtnoiYOWfkcLxphq9gEfV4jDZMfriX638XaL8QvNHaw3pTN0Or6trGV/YYUZaEggje709CMXUAQBGgqQxItbEW1xX+uCsN2Fv6xfI/54a5CirfLBfHP2SbVllKKCJ/sDQGUGf4ZFJRC1dK9LGnG2iUyH3eTOO2sSoJw1dWtfcLsYYFUM2+se4A7CjLMfMN/kg0g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=alumni.caltech.edu; dmarc=pass action=none
 header.from=alumni.caltech.edu; dkim=pass header.d=alumni.caltech.edu;
 arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni.caltech.edu;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=GkfnlawCuOnbP1jjY2iq1D7moIKuDpVAPLDxuKsCtUQ=;
 b=gM9z13LXEXfk1gVph3OZFVS51P7iEy0FyFGknKug0qjwHNQsOaUtorSrjkJtYK9fksCDHV8TssX7yxPkJ99L08brRxmYmMZw8APWyAkmSo6pmKdoKRTtnrYECUSlnklAKecJQz+pA2wOioVcqsAeKEUTeQ95AoJOMV6R5H2QwBqC4vQYUaKVWHtsU3mhHP9775xgTehyaFQQBVAAu2J03aEHg4UHEGggq1sQLZlCU4SYiaJL3lkF9MeBqumAvb8GklRGFQBgH6gEw2RCF5jRfUWGrr/xcgcX3Ps76I3pKeK11iHsEfh4EDaMxzljihAdcNZtxDSX5x/HVkxepKC74w==
Received: from BYAPR03MB4374.namprd03.prod.outlook.com (2603:10b6:a03:c5::25)
 by SA1PR03MB6500.namprd03.prod.outlook.com (2603:10b6:806:1c7::5)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.18; Thu, 14 Mar
 2024 18:00:30 +0000
Received: from BYAPR03MB4374.namprd03.prod.outlook.com
 ([fe80::716d:bf0a:cbdb:4c5f]) by BYAPR03MB4374.namprd03.prod.outlook.com
 ([fe80::716d:bf0a:cbdb:4c5f%7]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024
 18:00:30 +0000
From: "Adler, Mark" <madler@HIDDEN>
To: wrotycz <wrotycz@HIDDEN>
Subject: Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32
Thread-Topic: bug#67022: Gzip decompression can be 60% faster using zlib's
 CRC32
Thread-Index: AQHaEzQCBUeiFjfTRESMeQAWk9Q/EbE3M6IAgAEY6gA=
Date: Thu, 14 Mar 2024 18:00:30 +0000
Message-ID: <CA1A2A8F-D1B5-4138-B286-0437FE2F0166@HIDDEN>
References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN>
 <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN>
In-Reply-To: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-mailer: Apple Mail (2.3774.400.31)
authentication-results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=alumni.caltech.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BYAPR03MB4374:EE_|SA1PR03MB6500:EE_
x-ms-office365-filtering-correlation-id: 5237d070-13be-404f-b07d-08dc4450a322
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: X2NMwqoKI+udT2t9FGo6Lsrn2bcpHonT9isgSTGfm/Drr4LWf8lPx4zS424WfomeXsN24vVTMUXDlhPfFvjL+I+WRzxY54BgXCI9eUt3TG6dQT8JnBZbRH9nTBMVdWZs6/ySBFOH+VWmieNixDg4akHqgkgECZopsZxXhDadeAp645aiHeCKErg9eeJ6xxsYqvdenQVxgHzCRH6w6MttoYkGB6/bTsol16kB+o/vBnboe8arHddvqr3Yy+lxHkZ0Sdvo8SWNXxbFgqi2ZOlfZ57mOzylmKRaIyNheUX85c5g3IzSNseQq3qCHH6E8I/+U+PGHpba3hSEtmUpnz1OXjkryhNiNmJb/FwJUlwny/V6/++u3arNM5dxT9/6SnXjk+tmziHaaLdIC50ck8pHLlA3fVvSR4mhkxWGPlLY9Dtmj/bKLSKgBw//qw1PJ2BtCqxb58U+WWn/r7nX2YgmJBQY9fW7gvlTY9qFcS05HLQN2ExJGcYQImPDQO5/4Dfyo0hWXjjWGkoK+ZjmxG1ekl8JPxpAz3pGohU1vfmMIFYFtVYdc+nCOi0nQPu2RNbPTN9ScmP+c0kCHWsRI1GjzPn1hL6NwPjrWQuh6u8PuHQTIjhocMLnBZku3J4+Me506P18xzCRmSOVzcn4xlBioo5bA70ee62kbXQdfieJ4TPCamxRMceUxIT3wfV54QxGIklzS9E6MGX0Jk6inncOD58RZiU9lGHwrFh9Z/vQYGM=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:BYAPR03MB4374.namprd03.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230031)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1102; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?V2RZQ0dZdnIxZW9WYXZxdHRSbkJmc3d6TmEzUlM5ZGFkSG5mdzkyKy9LOHI4?=
 =?utf-8?B?am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SZkRJQWUv?=
 =?utf-8?B?dVViTlVlalFad0U3L09RODdJT1Yzcng5MTc5YzJBTHh4Um02eGpRbTRnQzZh?=
 =?utf-8?B?U2hYblFLajlQSGJjOXpxMXlDcE9QNFkvRFBDbEVXaW0vVUdjdit5OTg4WGpS?=
 =?utf-8?B?MjlUdCsrdHVacHc2UEFRVXZLaWJ6RVBiMVdSQU9mUDNRTVRwWllRVndxdzlK?=
 =?utf-8?B?anF2NGVHVkNCcU92dUFQTFB6aXJhWWYxaytNcEN3NFNXNmk0cmNpenUydTMv?=
 =?utf-8?B?UUIvNnRBRHhQdjRFS1NrN3AwUEgvbmFrRlN3bEhQR1JEWEY1d2hEY3FBTzhu?=
 =?utf-8?B?VnhSb2h5cFhMcE9rajkzM0pBbnY3NHRuNEs5SktzUVFYd3hHZnVZeC9TSTJi?=
 =?utf-8?Q?QqEU/n7PGe/FxsxedQ8gw/hsIGSD4eqB8tjrg2EQVhnE?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <D92B915CC389E945B635D4C86705187F@HIDDEN>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: alumni.caltech.edu
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BYAPR03MB4374.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5237d070-13be-404f-b07d-08dc4450a322
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 18:00:30.4546 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: fd5be9d9-7b72-4df9-830e-b1f9cc5b44bd
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: xsXZGLCy12xoDWdf+FkIBC/seQ5Ch/Q1drUGUEoD2hAlv4+FttAX1abRYYol0ehjJnniITD5v8F42XO3RWWD708CUYvUwRfboLg/LqWKmUJW7RWGlsSXSP1/8wXuWcNk
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR03MB6500
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67022
Cc: "67022 <at> debbugs.gnu.org" <67022 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

TXIuIFdyb3R5Y3osDQoNCknigJltIG5vdCBzdXJlIHdoYXQgeW91IG1lYW4gYnkg4oCcYmxvYXRl
ZOKAnSwgYnV0IGFueXdheSwgdGhlIGN1cnJlbnQgY29kZSBpbiB6bGliIGZvciBDUkMtMzIgZG9l
cyBub3QgdXNlIHNsaWNlLWJ5LTguIEl0IHVzZXMgYnJhaWRzLCB3aGljaCBpcyBmYXN0ZXIuIElm
IHRoZXJlIHdlcmUgZ29pbmcgdG8gYmUgYSByZXBsYWNlbWVudCBmb3IgdGhlIHNvZnR3YXJlIENS
QyBpbiBnemlwLCBpdCBzaG91bGQgc3RhcnQgdGhlcmUuDQoNCkl0IGNvdWxkIGFsc28gZmluaXNo
IHRoZXJlLCBzaW1wbHkgYnkgY29weWluZyBhbGwgdGhlIGNvZGUuIEl0IGlzLCBhZnRlciBhbGws
IG9wZW4gc291cmNlLg0KDQpBcyBmb3IgdGhlIOKAnG1hZ2ljYWzigJ0sIGFueSBzdWZmaWNpZW50
bHkgYWR2YW5jZWQgdGVjaG5vbG9neSBpcyBpbmRpc3Rpbmd1aXNoYWJsZSBmcm9tIG1hZ2ljLiAg
Oi0pDQoNCk1hcmsNCg0KDQo+IE9uIE1hciAxMywgMjAyNCwgYXQgNjoxNOKAr1BNLCB3cm90eWN6
IDx3cm90eWN6QHdpci5wbD4gd3JvdGU6DQo+IA0KPiBJIHRyaWVkIHRvIGltcGxlbWVudCB0aGlz
IHNsaWNlLWJ5LTggQ1JDIGJ1dCBjb3VsZG4mIzM5O3QgZG8gaXQgdGhlIHdheSBJIHdhbnRlZCAt
IHdpdGhvdXQgYmxvYXRlZCB6bGliIHRhYmxlcyBhbmQgc3R1ZmYuIE1heWJlIGJlY2F1c2UgSSBk
b24mIzM5O3QgZ2V0IHdoYXQgdXBkY3JjKCksIGdldGNyYygpLCBzZXRjcmMoKSBhcmUgYW5kIHdo
YXQgdGhleSBhY3R1YWxseSBkby4gVGhlIHdob2xlIHByb2dyYW0gaXMgbWFnaWNhbCwgdGhlcmUg
aXMgbm8gd2F5IHRvIGZpbmQgZG9fZGUvY29tcHJlc3MoKSwgbm9yIGFueXRoaW5nIGxpa2UgdGhh
dCwgc28gaXQgd2FzIGRpZmZpY3VsdCB0byBhY3R1YWxseSBmaW5kIHJlbGV2YW50IGNvZGUuIEJ1
dCBhbnl3YXksIGZvciBhIHN0YXJ0IEkgbWFuZ2VkIHRvIG1ha2UgYG1ha2VjcmNzOC5jJiMzOTsg
dG8gZ2VuZXJhdGUgQ1JDcyBsb29rdXAgdGFibGUgKGF0dGFjaGVkKS4gICBSZWdhcmRzICB3cm90
eWN6DQo+IDxtYWtlY3JjczguYz4NCg0K




Information forwarded to bug-gzip@HIDDEN:
bug#67022; Package gzip. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Mar 2024 02:48:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 13 22:48:01 2024
Received: from localhost ([127.0.0.1]:47670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rkb8T-0003Rd-8e
	for submit <at> debbugs.gnu.org; Wed, 13 Mar 2024 22:48:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:41150)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wrotycz@HIDDEN>) id 1rkZh4-0006qT-10
 for submit <at> debbugs.gnu.org; Wed, 13 Mar 2024 21:15:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkZgU-0004xQ-7I
 for bug-gzip@HIDDEN; Wed, 13 Mar 2024 21:15:02 -0400
Received: from mx-out.tlen.pl ([193.222.135.140])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <wrotycz@HIDDEN>) id 1rkZgQ-0001KV-Tu
 for bug-gzip@HIDDEN; Wed, 13 Mar 2024 21:15:01 -0400
Received: (wp-smtpd smtp.tlen.pl 32573 invoked from network);
 14 Mar 2024 02:14:54 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wir.pl; s=1024a;
 t=1710378894; bh=j6mAS0LqHXYr++CLC4dcHnE68KIpfDk0j0S5ls7Cpco=;
 h=Subject:From:To;
 b=V/n5mnh8ft/luDoKI6RSGfJ9SkUDYyDjjoo4cqLv7n5/0YJZtnEBkGwKMjONPdThn
 jKP5SwGmm5EY2H4OTW9Zf/qZIQRYmKNghNPzWdH0sKZexB6k9NgmGoBFSVEjRldHf5
 26O+ngs6HIbRv6SKoPhghQsTp9lD9VJXPWEMqz7Q=
Received: from localhost.localdomain (HELO localhost) ([5.184.234.228])
 (envelope-sender <wrotycz@HIDDEN>)
 by smtp.tlen.pl (WP-SMTPD) with SMTP
 for <bug-gzip@HIDDEN>; 14 Mar 2024 02:14:54 +0100
Content-Type: multipart/mixed; boundary="3SDOJXUSDLJMMLPQDRBVJnhgwp"
MIME-Version: 1.0
User-Agent: GWP-Draft
X-FactoryStamp: HA--
Date: Thu, 14 Mar 2024 02:14:54 +0100
X-Draft-Variant: new
X-Draft-Contenttype: text/html
Priority: normal
Subject: =?UTF-8?Q?Re=3A_bug=2367022=3A_Gzip_decompression_can_be_60=25_faster_using_zlib=27s_CRC32?=
From: wrotycz <wrotycz@HIDDEN>
To: bug-gzip <bug-gzip@HIDDEN>
Message-ID: <918ec4a393f345b39a36ac5d1a56e2d5@HIDDEN>
X-WP-MailID: 945866569f2da1318335d7af95958ad7
X-WP-AV: skaner antywirusowy Poczty o2
X-WP-SPAM: NO 0000010 [scNU]                               
Received-SPF: pass client-ip=193.222.135.140; envelope-from=wrotycz@HIDDEN;
 helo=mx-out.tlen.pl
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001,
 RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 13 Mar 2024 22:47:58 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--3SDOJXUSDLJMMLPQDRBVJnhgwp
Content-Type: multipart/alternative; boundary="10HRHLDDXTJVCSCNTBMDMJnhgwp"


--10HRHLDDXTJVCSCNTBMDMJnhgwp
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

I tried to implement this slice-by-8 CRC but couldn&#39;t do it the way I w=
anted - without bloated zlib tables and stuff. Maybe because I don&#39;t ge=
t what updcrc(), getcrc(), setcrc() are and what they actually do. The whol=
e program is magical, there is no way to find do_de/compress(), nor anythin=
g like that, so it was difficult to actually find relevant code. But anyway=
, for a start I manged to make `makecrcs8.c&#39; to generate CRCs lookup ta=
ble (attached).   Regards  wrotycz=0D

--10HRHLDDXTJVCSCNTBMDMJnhgwp
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<br><div>I tried to implement this slice-by-8 CRC but couldn't do it the wa=
y I wanted - without bloated zlib tables and stuff. Maybe because I don't g=
et what updcrc(), getcrc(), setcrc() are and what they actually do. The who=
le program is magical, there is no way to find do_de/compress(), nor anythi=
ng like that, so it was difficult to actually find relevant code. But anywa=
y, for a start I manged to make `makecrcs8.c' to generate CRCs lookup table=
 (attached).<br></div><div><br></div><div>Regards<br></div><div>wrotycz<br>=
</div><div><br></div><br>
--10HRHLDDXTJVCSCNTBMDMJnhgwp--

--3SDOJXUSDLJMMLPQDRBVJnhgwp
Content-Disposition: attachment; filename="=?utf-8?b?bWFrZWNyY3M4LmM=?="
Content-Id: <0aa0b75434b4ea6f5e2d61f2dbc13fbb>
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream

77u/LyogTm90IGNvcHlyaWdodGVkIDE5OTAgTWFyayBBZGxlciAqLwoKI2luY2x1ZGUgPHN0ZGlv
Lmg+CgppbnQKbWFpbiAoKQovKgogICAgR2VuZXJhdGUgYSB0YWJsZSBmb3IgYSBieXRlLXdpc2Ug
MzItYml0IENSQyBjYWxjdWxhdGlvbiBvbiB0aGUgcG9seW5vbWlhbDoKICAgIHheMzIreF4yNit4
XjIzK3heMjIreF4xNit4XjEyK3heMTEreF4xMCt4XjgreF43K3heNSt4XjQreF4yK3grMS4KCiAg
ICBQb2x5bm9taWFscyBvdmVyIEdGKDIpIGFyZSByZXByZXNlbnRlZCBpbiBiaW5hcnksIG9uZSBi
aXQgcGVyIGNvZWZmaWNpZW50LAogICAgd2l0aCB0aGUgbG93ZXN0IHBvd2VycyBpbiB0aGUgbW9z
dCBzaWduaWZpY2FudCBiaXQuICAgIFRoZW4gYWRkaW5nIHBvbHlub21pYWxzCiAgICBpcyBqdXN0
IGV4Y2x1c2l2ZS1vciwgYW5kIG11bHRpcGx5aW5nIGEgcG9seW5vbWlhbCBieSB4IGlzIGEgcmln
aHQgc2hpZnQgYnkKICAgIG9uZS4gICAgSWYgd2UgY2FsbCB0aGUgYWJvdmUgcG9seW5vbWlhbCBw
LCBhbmQgcmVwcmVzZW50IGEgYnl0ZSBhcyB0aGUKICAgIHBvbHlub21pYWwgcSwgYWxzbyB3aXRo
IHRoZSBsb3dlc3QgcG93ZXIgaW4gdGhlIG1vc3Qgc2lnbmlmaWNhbnQgYml0IChzbyB0aGUKICAg
IGJ5dGUgMHhiMSBpcyB0aGUgcG9seW5vbWlhbCB4XjcreF4zK3grMSksIHRoZW4gdGhlIENSQyBp
cyAocSp4XjMyKSBtb2QgcCwKICAgIH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7CiAgICAgICAgY3JjID0gaTsKICAg
ICAgICAvKiBUaGUgaWRlYSB0byBpbml0aWFsaXplIHRoZSByZWdpc3RlciB3aXRoIHRoZSBieXRl
IGluc3RlYWQgb2YKICAgICAgICAgKiB6ZXJvIHdhcyBzdG9sZW4gZnJvbSBIYXJ1aGlrbyBPa3Vt
dXJhJ3MgYXIwMDIgKi8KICAgICAgICBmb3IgKGsgPSA4OyBrOyBrLS0pCiAgICAgICAgICAgIGNy
YyA9IGNyYyAmIDEgPyAoY3JjID4+IDEpIF4gcG9seSA6IGNyYyA+PiAxOwogICAgICAgIGNyYzMy
X2x1dFswXVtpXSA9IGNyYzsKICAgIH0KICAgIHByaW50ZigiXG4iKTsKCiAgICAvKiBDcmVhdGUg
dGFibGUgZm9yIHNsaWNlcyAqLwogICAgZm9yIChpID0gMDsgaSA8IDI1NjsgaSsrKQogICAgewog
ICAgICAgIGNyYyA9IGNyYzMyX2x1dFswXVtpXTsKICAgICAgICBmb3IgKGsgPSAxOyBrIDwgc2xp
Y2VzOyBrKyspCiAgICAgICAgewogICAgICAgICAgICBjcmMgPSBjcmMzMl9sdXRbMF1bY3JjICYg
MHhmZl0gXiAoY3JjID4+IDgpOwogICAgICAgICAgICBjcmMzMl9sdXRba11baV0gPSBjcmM7CiAg
ICAgICAgfQogICAgfQoKICAgIC8qIFByaW50IHRhYmxlICovCiAgICBmb3IgKGsgPSAwOyBrIDwg
c2xpY2VzOyBrKyspCiAgICB7CiAgICAgICAgcHJpbnRmKCIgICAiKTsKICAgICAgICBmb3IoaSA9
IDA7IGkgPCAyNTY7IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIGlmIChpICYmICgoaSAlIDQp
ID09IDApKSBwcmludGYoIlxuICAgIik7CiAgICAgICAgICAgIGNyYyA9IGNyYzMyX2x1dFtrXVtp
XTsKICAgICAgICAgICAgcHJpbnRmKCIgMHglMDhseEwsIiwgY3JjKTsKICAgICAgICB9CiAgICAg
ICAgcHJpbnRmKCJcblxuIik7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K

--3SDOJXUSDLJMMLPQDRBVJnhgwp--




Information forwarded to bug-gzip@HIDDEN:
bug#67022; Package gzip. Full text available.

Message received at 67022 <at> debbugs.gnu.org:


Received: (at 67022) by debbugs.gnu.org; 9 Nov 2023 18:33:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 13:33:33 2023
Received: from localhost ([127.0.0.1]:48707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r19qO-0004ga-TE
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 13:33:33 -0500
Received: from mail.cs.ucla.edu ([131.179.128.66]:34374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1r19qL-0004gL-DH
 for 67022 <at> debbugs.gnu.org; Thu, 09 Nov 2023 13:33:31 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id C103E3C011BDC;
 Thu,  9 Nov 2023 10:32:43 -0800 (PST)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id M5nbw4KUL5eM; Thu,  9 Nov 2023 10:32:43 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 879C33C011BDA;
 Thu,  9 Nov 2023 10:32:43 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 879C33C011BDA
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1699554763;
 bh=v8+XiCNZqHwK4s479dXEPdNO6k424sKN27MvroFFuWE=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=CgAApop11El372zqs8aTvvJeQBwTESdQVgRVZ4WDeliXc0COa4ffEiEdMm4eFxfjc
 7x7YHIx4r6DR3yqLOUzn6DqZ9J8IdD0sSpTkTGoTSGIpV1Z9GwqL4aL3z6tu5JnZuv
 +Fc1AYv3mV1kQe3ZsrgZrBS/XtxmPyFkj7hSu+JvTi5XYejYRP9cb+sob1ricd7hNo
 8EJLYC84WvzDACrTSVhMXLRGuGR+10Y03FNwn/T7BCFv++jUex2ggZlu27v+VoJDZN
 RWHfhWDBaVQAXcimJmiuuLCEXAnBH8r6snymO3CTijPMCPHk0JjhG0LSAvXoJM1+Vl
 bysrNKTBzuhsQ==
X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 3WTSw8et19-V; Thu,  9 Nov 2023 10:32:43 -0800 (PST)
Received: from [192.168.254.12] (unknown [47.148.192.211])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id 63E9B3C011BDC;
 Thu,  9 Nov 2023 10:32:43 -0800 (PST)
Message-ID: <e703aea9-aa26-4b03-a20f-5d7b32ab3d44@HIDDEN>
Date: Thu, 9 Nov 2023 10:32:43 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#67022: Gzip decompression can be 60% faster using zlib's CRC32
Content-Language: en-US
To: Young Mo Kang <kym327@HIDDEN>, 67022 <at> debbugs.gnu.org
References: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 67022
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2023-11-09 09:40, Young Mo Kang wrote:
> Since both GNU Gzip and zlib are written by the same authors, I was 
> wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this 
> performance gain--I am not sure if there would be a license issue though.

Shouldn't be a license issue. It's just a lack of time issue.




Information forwarded to bug-gzip@HIDDEN:
bug#67022; Package gzip. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:41:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 09 12:41:17 2023
Received: from localhost ([127.0.0.1]:48681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r191p-0000lA-EJ
	for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:17 -0500
Received: from lists.gnu.org ([2001:470:142::17]:34440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kym327@HIDDEN>) id 1r191m-0000kw-Km
 for submit <at> debbugs.gnu.org; Thu, 09 Nov 2023 12:41:15 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1914-0001w5-1L
 for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:30 -0500
Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <kym327@HIDDEN>) id 1r1912-0004NM-8G
 for bug-gzip@HIDDEN; Thu, 09 Nov 2023 12:40:29 -0500
Received: by mail-qt1-x836.google.com with SMTP id
 d75a77b69052e-41cd444d9d0so7507451cf.2
 for <bug-gzip@HIDDEN>; Thu, 09 Nov 2023 09:40:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1699551626; x=1700156426; darn=gnu.org;
 h=content-transfer-encoding:subject:from:to:content-language
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=;
 b=jsUlC78mD7oKOF0L44AGwOmEw8caH3ZBlLtk9+fcKbWa94xCnLhxzzrZcbxCF6eTWa
 QqPEps5BX9wqHC+0qkOrCnqMtVY5W7s9OWU5R0c5b5eeahNc8N6lFbHxygy1WOac2kU3
 1sBx75dE1KfR12VLF8WZZ2ZBIsYTnQ46Nu6WipIjyoBRUtxK9wsXhMAyV4e5XFilo1SX
 Cuo46rlNk3YTDVp8QeK+wFQ0xpZnmGqiGROA4sCupsxr3gy6sQGTbZIaPHW3Ra45I1bb
 KUhfnu3333GmBFVL0w2C8okwzBBkzCvkiu2MVSuPrQExvDrZE7xX3tXuTkmEdlnSB252
 4A7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1699551626; x=1700156426;
 h=content-transfer-encoding:subject:from:to:content-language
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=4xj/b7+3lxCUWZ5BqvyWu26PadinSdhpL5Gb+alIpXs=;
 b=wDrw2hn6R0f6+F9w31t+3czeJH5PJ5cTY0ZqzNW71H6dS0KCfR/jTl4vbk5JEAlFfj
 cN3BLaDXCUN6xnXnXT08WjCYk8HFg90C0VnHFHvfnxSLNl6k59AR3z8Uc8oD1tJXA2fW
 Nv20/x9C8tz+N+kH7LZUDunsnae/o04k3zDTyumkDaCohYUuwJkoPwwdjPEId1LmuqtK
 e4iResOTsQpDj68tcequG14wqxGeoB8Eg4VKteSkoQtziSkRNRb4/nfhs5JKlA48Bszh
 ehNGRCUepNMj+EeXmUw+yyvh3ACt+dMdFl7mSghggjwiwJAgH1HXOb5aUlED1YiTX6NI
 5uFw==
X-Gm-Message-State: AOJu0YxZgzfpkNw9GTTusgX1C+AiJ0YsX6fl/i/f2AVjuT8hAJtH4vzM
 UmWy/xUUgROhQT1AhfobDYJ5PSzn+A==
X-Google-Smtp-Source: AGHT+IFdH5rL1itK2Bjkj4kTnzeLECoO09hfqUiw9rtz+txGQfcdCqdq3U25fV2tI5gJF20Ot0hvGw==
X-Received: by 2002:a05:622a:130c:b0:419:5b97:2fbb with SMTP id
 v12-20020a05622a130c00b004195b972fbbmr6106355qtk.34.1699551626359; 
 Thu, 09 Nov 2023 09:40:26 -0800 (PST)
Received: from ?IPV6:2603:7000:3400:d5b2:1b9e:c639:2739:6a32?
 (2603-7000-3400-d5b2-1b9e-c639-2739-6a32.res6.spectrum.com.
 [2603:7000:3400:d5b2:1b9e:c639:2739:6a32])
 by smtp.gmail.com with ESMTPSA id
 f10-20020ac8134a000000b004108d49f391sm2114381qtj.48.2023.11.09.09.40.25
 for <bug-gzip@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 09 Nov 2023 09:40:25 -0800 (PST)
Message-ID: <95870740-74fc-4416-aad0-640c0eaf8832@HIDDEN>
Date: Thu, 9 Nov 2023 12:40:24 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: bug-gzip@HIDDEN
From: Young Mo Kang <kym327@HIDDEN>
Subject: Gzip decompression can be 60% faster using zlib's CRC32
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2607:f8b0:4864:20::836;
 envelope-from=kym327@HIDDEN; helo=mail-qt1-x836.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hello, I have noticed that GNU Gzip's CRC32 calculation is
 the main bottleneck in decompression, and it can run significantly faster
 >60% if we replace it with crc32 function from zlib. I tested decompression
 speed of linux source code tar.gz file before and after replacing CRC32
 computation. On an AMD 7735HS system, I get 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (kym327[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (kym327[at]gmail.com)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

Hello,


I have noticed that GNU Gzip's CRC32 calculation is the main bottleneck 
in decompression, and it can run significantly faster >60% if we replace 
it with crc32 function from zlib.


I tested decompression speed of linux source code tar.gz file before and 
after replacing CRC32 computation. On an AMD 7735HS system, I get

GNU Gzip unmodified
     Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.11
GNU Gzip with CRC32 from zlib
     Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.16


And I saw even better performance improvement when tested on an Apple 
Silicon M1 system.

GNU Gzip unmodified
     Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.83
GNU Gzip with CRC32 from zlib
     Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.72


Since both GNU Gzip and zlib are written by the same authors, I was 
wondering if GNU Gzip can share zlib's CRC32 calculation and obtain this 
performance gain--I am not sure if there would be a license issue though.


The following bash script should reproduce the result

```

# download GNU Gzip and zlib
wget -O- https://ftp.gnu.org/gnu/gzip/gzip-1.13.tar.gz | tar xzf -
wget -O- https://zlib.net/zlib-1.3.tar.gz | tar xzf -

# download linux source code as a test file for decompression speed
wget -O- https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.1.tar.xz 
| xz -d | gzip > linux.tar.gz

# compile zlib
cd zlib-1.3
CFLAGS="-O2 -g" ./configure --static && make -j
cd ..

# compile GNU Gzip
cd gzip-1.13
CFLAGS="-O2 -g" ./configure && make -j

# measure decompression speed
/usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip1.time

# use crc32 from zlib
cat > util.diff << EOF
@@ -27,6 +27,7 @@
  #include <stdlib.h>
  #include <errno.h>

+#include "crc32.h"
  #include "tailor.h"
  #include "gzip.h"
  #include <dirname.h>
@@ -136,25 +137,14 @@ copy (int in, int out)
  ulg
  updcrc (uch const *s, unsigned n)
  {
-    register ulg c;         /* temporary variable */
-
-    if (s == NULL) {
-        c = 0xffffffffL;
-    } else {
-        c = crc;
-        if (n) do {
-            c = crc_32_tab[((int)c ^ (*s++)) & 0xff] ^ (c >> 8);
-        } while (--n);
-    }
-    crc = c;
-    return c ^ 0xffffffffL;       /* (instead of ~c for 64-bit machines) */
+    crc = crc32(crc, s, n);
  }

  /* Return a current CRC value.  */
  ulg
  getcrc ()
  {
-  return crc ^ 0xffffffffL;
+  return crc;
  }

  #ifdef IBM_Z_DFLTCC
EOF
patch < util.diff util.c

# create header file
cat > crc32.h << EOF
#pragma once

unsigned long  crc32(unsigned long crc, const unsigned char  *buf,
                             unsigned int len);
EOF

# copy crc32 object file from zlib
cp ../zlib-1.3/crc32.o .

# re-compile GNU Gzip
gcc -O2 -g -c util.c -Ilib
gcc -O2 -g *.o lib/libgzip.a -o gzip

# measure decompression speed
/usr/bin/time -v ./gzip -d < ../linux.tar.gz > linux.tar 2> ../gzip2.time

# print out time difference
cd ..
echo
echo "GNU Gzip unmodified"
grep Elapsed gzip1.time
echo "GNU Gzip with CRC32 from zlib"
grep Elapsed gzip2.time
```





Acknowledgement sent to Young Mo Kang <kym327@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gzip@HIDDEN. Full text available.
Report forwarded to bug-gzip@HIDDEN:
bug#67022; Package gzip. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 14 Mar 2024 18:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.