[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why hexcat?

On Mon, Feb 10, 2003 at 06:27:16PM +0200, Abraham vd Merwe wrote:
> The reason why I wrote hexcat was that hextype and od, etc. couldn't dump
> the files the way I wanted it: i.e. 4-byte columns with 16-byte ascii
> display on the side (The closest was hexdump -C, but still not what I want
> and as Richard mention, hexdump is not the fastest around - not sure about od).

I did some speed tests, and it seems that hextype's README.Debian is
a bit out of date.  I don't know if hexdump got faster or hextype
got slower.  These were the results:

   6.0 MB/s     hexdump
   3.2 MB/s     hexdump formatted like hextype
   2.7 MB/s     hexdump invoked as hd
   9.6 MB/s     hextype
   71 kB/s      hexcat

Looks like hextype is only three times as fast now, and hexcat is
orders of magnitude slower.  One significant advantage of hexdump
(IMHO) is that it compresses repeated identical lines, which makes
it much easier to browse through filesystem images.

Maybe it's time to ask for hextype to be dropped from Debian.
"hd" is faster to type, anyway, and also looks nice.

(Method: I dumped a 100 MB file to /dev/null, measuring with "time" and
averaging over three runs, on an otherwise quiet system.  I made sure the
file was loaded into memory first.  For hexcat I used a 1 MB file because
I got impatient.  The file contained many blocks of zeroes, so hexdump
had an advantage from its duplicate-compression.)

Richard Braakman

Reply to: