From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: md5 checksum of a img file, or get the value of 100th byte Date: Thu, 5 Jun 2008 04:29:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <196be374-4aa5-4c2f-ac8d-9555502d386c@s21g2000prm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1212666073 4757 80.91.229.12 (5 Jun 2008 11:41:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2008 11:41:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 13:41:52 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K4DqR-0006cg-UO for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jun 2008 13:41:28 +0200 Original-Received: from localhost ([127.0.0.1]:49243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4Dpf-00070B-3M for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jun 2008 07:40:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!s21g2000prm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1212665399 2187 127.0.0.1 (5 Jun 2008 11:29:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 5 Jun 2008 11:29:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s21g2000prm.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159118 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54467 Archived-At: 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 =E2=88=91 http://xahlee.org/ =E2=98=84