Deutsch English Français Italiano |
<20240603130145.00003b0b@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S <already5chosen@yahoo.com> Newsgroups: comp.lang.c Subject: Re: xxd -i vs DIY Was: C23 thoughts and opinions Date: Mon, 3 Jun 2024 13:01:45 +0300 Organization: A noiseless patient Spider Lines: 27 Message-ID: <20240603130145.00003b0b@yahoo.com> References: <v2l828$18v7f$1@dont-email.me> <00297443-2fee-48d4-81a0-9ff6ae6481e4@gmail.com> <v2lji1$1bbcp$1@dont-email.me> <87msoh5uh6.fsf@nosuchdomain.example.com> <f08d2c9f-5c2e-495d-b0bd-3f71bd301432@gmail.com> <v2nbp4$1o9h6$1@dont-email.me> <v2ng4n$1p3o2$1@dont-email.me> <87y18047jk.fsf@nosuchdomain.example.com> <87msoe1xxo.fsf@nosuchdomain.example.com> <v2sh19$2rle2$2@dont-email.me> <87ikz11osy.fsf@nosuchdomain.example.com> <v2v59g$3cr0f$1@dont-email.me> <20240528144118.00002012@yahoo.com> <v34odg$kh7a$1@dont-email.me> <20240528185624.00002494@yahoo.com> <v359f1$nknu$1@dont-email.me> <20240528232315.00006a58@yahoo.com> <v35qrg$qhnf$1@dont-email.me> <20240529123852.000026e4@yahoo.com> <v37386$148la$1@dont-email.me> <20240529152325.000042e1@yahoo.com> <v37db5$15p5b$1@dont-email.me> <20240529183218.000027c2@yahoo.com> <v37pc5$186go$1@dont-email.me> <v383bp$19tqg$1@dont-email.me> <v3jshc$3q731$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Date: Mon, 03 Jun 2024 12:01:33 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2e115e67b3843932598c276339879624"; logging-data="4002254"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lMEXjeArLjzFYJLsl3XeNHxvdWUrVwl8=" Cancel-Lock: sha1:Fouvl4xtv3xUhkUU+9ZVcftGfBQ= X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32) Bytes: 2900 On Mon, 3 Jun 2024 07:49:00 -0000 (UTC) Lawrence D'Oliveiro <ldo@nz.invalid> wrote: > On Wed, 29 May 2024 21:31:54 +0100, bart wrote: >=20 > > Conclusion: beating xxd is apparently not hard if even a scripting > > language can do so. I wonder what slows it down? =20 >=20 > It=E2=80=99s written in a very stdio-dependent vanilla C style. >=20 So are all our [much much faster] mini-utils. > Have a look at the source for yourself. It=E2=80=99s part of the =E2=80= =9Cvim=E2=80=9D > package on Debian and no doubt other distros. The xxd binary itself > is built from a single source file of just some 1200 lines, and the > hex-to-binary conversion is done in a function called =E2=80=9Chuntype=E2= =80=9D of > just 133 lines. The question was about binary-to-hex rather than hex-to-binary. BTW, it seems that 'xxd -i -r' does not work at all. Or, at least, I was unable to figure out right combination of flags.