From unknown Fri Jun 20 07:08:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73814 <73814@debbugs.gnu.org> To: bug#73814 <73814@debbugs.gnu.org> Subject: Status: [PATCH] maint: Drop unused sample/makecrc.c. Reply-To: bug#73814 <73814@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:08:59 +0000 retitle 73814 [PATCH] maint: Drop unused sample/makecrc.c. reassign 73814 gzip submitter 73814 Simon Josefsson severity 73814 normal tag 73814 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 15 03:47:46 2024 Received: (at submit) by debbugs.gnu.org; 15 Oct 2024 07:47:46 +0000 Received: from localhost ([127.0.0.1]:53923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0cHR-0003Nv-Sh for submit@debbugs.gnu.org; Tue, 15 Oct 2024 03:47:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:46600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0cHP-0003Nj-Mq for submit@debbugs.gnu.org; Tue, 15 Oct 2024 03:47:44 -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 ) id 1t0cH3-0004WJ-93 for bug-gzip@gnu.org; Tue, 15 Oct 2024 03:47:22 -0400 Received: from uggla.sjd.se ([2001:9b1:8633::107]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0cH0-0007U3-H6 for bug-gzip@gnu.org; Tue, 15 Oct 2024 03:47:20 -0400 DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description; bh=6eb6eqGB6uXqu4U+YSgjinxtzc94avu0e7bcA/Y1ovc=; t=1728978428; x=1730188028; b=g336mXQAJyoB8TUp4iwAl3h9pSC96jw/typftn2FRCKfQcF 6cCHJEPhc9bVLS4HUIXNdKAlW+YZtwXHwbaEOCA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description; bh=6eb6eqGB6uXqu4U+YSgjinxtzc94avu0e7bcA/Y1ovc=; t=1728978428; x=1730188028; b=hW663lKwwuQXuy4dxeUQ5DMhpcb9Dp83Z3Tn8x/Ps3Rjeq0 WCeqPDicGEbotrsCI6Djk/GlxkIYHagsuFqXNmbWxKuy1DFohwN2W5O8hDsB0ceIGXVwrI8+pYKvr MKUpqyIlFq5fwjtcZICzdYUYvrooMW8gxeT+U1cDdmFw5L6BIbDmYGbMWQJ+OT9/ffHXqaghpJDOH AuRTA0kdCADm/51IChriy6dy0yKGdRTb4jpIC+o9qKEXr/1dKMh44OFzzqVdNx11ITOgpQMPv0zuN 6ylDr5nwwepnjtVqShvfpFnb2qUAwq5LzgyuFd8oHBq+cK6dpFlxtHx2PrPNs5tWazbfk+DB0krOv lEq+alu7eJkHW9FVVUmMFZTxlcK1//8jzQP89a0CTGdHLnBO4Ip1Bvzs3uVEIpkJ07TrYKDkjnJCH 54jUHYH0E2uzj3jF4mDfHWsk; Received: from [2001:9b1:41ac:ff00:823f:5dff:fe09:16ac] (port=45244 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t0cGo-008ix2-7L for bug-gzip@gnu.org; Tue, 15 Oct 2024 07:47:06 +0000 X-Hashcash: 1:23:241015:bug-gzip@gnu.org::5iGijAK8ImFWm+/R:1qXtT From: Simon Josefsson To: bug-gzip@gnu.org Subject: [PATCH] maint: Drop unused sample/makecrc.c. OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt Date: Tue, 15 Oct 2024 09:47:23 +0200 Message-ID: <874j5dolis.fsf@kaka.sjd.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:9b1:8633::107; envelope-from=simon@josefsson.org; helo=uggla.sjd.se X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi. The makecrc.c is not longer particulary relevant since gzip uses the gnulib crc module. The code is nice to preserve, and could be moved to gnulib eventually (possibly rewritten), but it will still be in gzip git forever, so doesn't have to be in the release archive. What do you think? /Simon --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-maint-Drop-unused-sample-makecrc.c.patch Content-Transfer-Encoding: quoted-printable From=208d2f138b50bae43f1a208eb98ec4ebace41b0e53 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 15 Oct 2024 09:44:25 +0200 Subject: [PATCH] maint: Drop unused sample/makecrc.c. =2D-- Makefile.am | 2 +- sample/makecrc.c | 61 ------------------------------------------------ 2 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 sample/makecrc.c diff --git a/Makefile.am b/Makefile.am index 1aaec82..c1fb1dd 100644 =2D-- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,7 @@ EXTRA_DIST =3D $(ACINCLUDE_INPUTS) $(man_MANS) \ dist-check.mk \ algorithm.doc \ gunzip.in gzexe.in gzip.doc \ =2D revision.h sample/makecrc.c \ + revision.h \ sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \ tailor.h \ zcat.in zcmp.in zdiff.in \ diff --git a/sample/makecrc.c b/sample/makecrc.c deleted file mode 100644 index bf789d3..0000000 =2D-- a/sample/makecrc.c +++ /dev/null @@ -1,61 +0,0 @@ =2D/* Not copyrighted 1990 Mark Adler */ =2D =2D#include =2D#include =2D =2Dint =2Dmain () =2D/* =2D Generate a table for a byte-wise 32-bit CRC calculation on the polynom= ial: =2D x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. =2D =2D Polynomials over GF(2) are represented in binary, one bit per coeffici= ent, =2D with the lowest powers in the most significant bit. Then adding polyn= omials =2D is just exclusive-or, and multiplying a polynomial by x is a right shi= ft by =2D one. If we call the above polynomial p, and represent a byte as the =2D polynomial q, also with the lowest power in the most significant bit (= so the =2D byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod= p, =2D where a mod b means the remainder after dividing a by b. =2D =2D This calculation is done using the shift-register method of multiplyin= g and =2D taking the remainder. The register is initialized to zero, and for ea= ch =2D incoming bit, x^32 is added mod p to the register if the bit is a one = (where =2D x^32 mod p is p+x^32 =3D x^26+...+1), and the register is multiplied m= od p by =2D x (which is shifting right by one and adding x^32 mod p if the bit shi= fted =2D out is a one). We start with the highest power (least significant bit= ) of =2D q and repeat for all eight bits of q. =2D =2D The table is simply the CRC of all possible eight bit values. This is= all =2D the information needed to generate CRC's on data a byte at a time for = all =2D combinations of CRC register values and incoming bytes. The table is =2D written to stdout as 256 long hexadecimal values in C language format. =2D*/ =2D{ =2D unsigned long c; /* crc shift register */ =2D unsigned long e; /* polynomial exclusive-or pattern */ =2D int i; /* counter for all possible eight bit values */ =2D int k; /* byte being shifted into crc apparatus */ =2D =2D /* terms of polynomial defining this crc (except x^32): */ =2D static int p[] =3D {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; =2D =2D /* Make exclusive-or pattern from polynomial (0xedb88320) */ =2D e =3D 0; =2D for (i =3D 0; i < sizeof(p)/sizeof(int); i++) =2D e |=3D 1L << (31 - p[i]); =2D =2D /* Compute and print table of CRC's, five per line */ =2D printf(" 0x00000000L"); =2D for (i =3D 1; i < 256; i++) =2D { =2D c =3D i; =2D /* The idea to initialize the register with the byte instead of =2D * zero was stolen from Haruhiko Okumura's ar002 =2D */ =2D for (k =3D 8; k; k--) =2D c =3D c & 1 ? (c >> 1) ^ e : c >> 1; =2D printf(i % 5 ? ", 0x%08lxL" : ",\n 0x%08lxL", c); =2D } =2D putchar('\n'); =2D return 0; =2D} =2D-=20 2.46.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZw4eCxQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFoowZAP4ool9mb6WzUaHS5nWpcbSIiAfpoLav Y/FiI6/eysaAkwEA5u7iZ8XvWx09nBloMhWBh7IwG+v++vCNySr1lEvzNQ4= =AObT -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 17 16:48:38 2024 Received: (at 73814-done) by debbugs.gnu.org; 17 Oct 2024 20:48:38 +0000 Received: from localhost ([127.0.0.1]:35801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1XQA-0003aS-47 for submit@debbugs.gnu.org; Thu, 17 Oct 2024 16:48:37 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:35874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1XQ4-0003a7-Fh for 73814-done@debbugs.gnu.org; Thu, 17 Oct 2024 16:48:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 8FEF43C00FA90; Thu, 17 Oct 2024 13:48:00 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id WRY_Qyfxp_KQ; Thu, 17 Oct 2024 13:47:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 38C463C00FA93; Thu, 17 Oct 2024 13:47:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 38C463C00FA93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1729198076; bh=KRzllEZo/EPiexQB48wBzI40g+yloPleOOw2gRVpvN8=; h=Message-ID:Date:MIME-Version:To:From; b=TQB/9wRIwz0pYVR38DBWjqDoiVLWsMFOOYl1L7j5UHvuQ+bMvc6WCfG44avPczxye +koILF0ZTj50BEid70Vvdkpcj9TL9KJSpIhLKn6sUoEegD1cjy0CtPemSvjOwC7FyE E8Zzyiofh5vCeAgLPPWrX/tc35UlCoCD0OHPfg2M6auEzR/5qRbFgK2sJ4QE/kHtuA azyWUvKYuVyDrtIuchk8QsKZ+qcF3K8gQRdYr8Z8YKyV+nX4aGXiDk39BI9sjVFKS0 CqOSrzvvNjRzkhwIAz+T8G3IfqW/vUL4PnQbxdhnEKESJ2tOWRmzpdaJNhkRVP8M4a gXFmoXZfZmNHQ== X-Virus-Scanned: amavis 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]) (amavis, port 10026) with ESMTP id sMEZgdTgwp4F; Thu, 17 Oct 2024 13:47:56 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 1EEF03C00FA92; Thu, 17 Oct 2024 13:47:56 -0700 (PDT) Message-ID: <0ede7156-994b-4f35-ac8d-13fa4533f60c@cs.ucla.edu> Date: Thu, 17 Oct 2024 13:47:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73814: [PATCH] maint: Drop unused sample/makecrc.c. To: Simon Josefsson References: <874j5dolis.fsf@kaka.sjd.se> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <874j5dolis.fsf@kaka.sjd.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73814-done Cc: 73814-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks, I installed that. From unknown Fri Jun 20 07:08:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 15 Nov 2024 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator