help-gnu-emacs
[Top][All Lists]
Advanced

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

md5 checksum of a img file, or get the value of 100th byte


From: Xah
Subject: md5 checksum of a img file, or get the value of 100th byte
Date: Thu, 5 Jun 2008 04:29:59 -0700 (PDT)
User-agent: G2/1.0

I have few thousand image files, and i need to compute a unique id for
each... something like md5 checksum.

I noticed that elisp has a md5 function that does that, but it takes a
buffer as argument. Does this mean that i have to create a buffer
first by opening the image file? Would this be very inefficient? since
all i need is to build a hash table of the image files, with checksum
as id and file path(s) as value.

or, is there some other way? Perhaps, i can use the image file size
together with a list of byte values at several file stream locations,
as the unique id... this should be sufficient for my purposes but how
do i get the value of, say, the 1000th byte?

Thanks in advance.

  Xah
  xah@xahlee.org
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]