From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: md5 checksum of a img file, or get the value of 100th byte
Date: Thu, 5 Jun 2008 04:29:59 -0700 (PDT) [thread overview]
Message-ID: <196be374-4aa5-4c2f-ac8d-9555502d386c@s21g2000prm.googlegroups.com> (raw)
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/
☄
next reply other threads:[~2008-06-05 11:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 11:29 Xah [this message]
2008-06-05 19:17 ` md5 checksum of a img file, or get the value of 100th byte Eli Zaretskii
[not found] ` <mailman.12717.1212693595.18990.help-gnu-emacs@gnu.org>
2008-06-06 14:44 ` Ted Zlatanov
2008-06-06 16:33 ` Eli Zaretskii
[not found] ` <mailman.12786.1212770026.18990.help-gnu-emacs@gnu.org>
2008-06-06 18:55 ` Ted Zlatanov
2008-06-06 20:07 ` Eli Zaretskii
[not found] ` <mailman.12802.1212782926.18990.help-gnu-emacs@gnu.org>
2008-06-06 22:45 ` Ted Zlatanov
2008-06-07 6:34 ` Eli Zaretskii
[not found] ` <mailman.12833.1212820449.18990.help-gnu-emacs@gnu.org>
2008-06-09 15:04 ` Ted Zlatanov
2008-06-09 15:58 ` Eli Zaretskii
2008-06-07 0:03 ` Tim X
2008-06-09 15:15 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=196be374-4aa5-4c2f-ac8d-9555502d386c@s21g2000prm.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).