From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Nordl=F6w?= Newsgroups: gmane.emacs.help Subject: Re: Constructing and Manipulating Raw Strings Date: Wed, 13 Oct 2010 10:23:13 -0700 (PDT) Organization: http://groups.google.com Message-ID: <96cbb2a1-d922-4952-a964-eac6ec0f73d6@s19g2000vbr.googlegroups.com> References: <1bef9c40-265a-4519-bf4a-a4ca443cab15@n40g2000vbb.googlegroups.com> <87tykqhyx7.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291870882 15113 80.91.229.12 (9 Dec 2010 05:01:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 05:01:22 +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 Dec 09 06:01:18 2010 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.69) (envelope-from ) id 1PQYd3-00062m-BZ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 06:01:17 +0100 Original-Received: from localhost ([127.0.0.1]:35910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQYd2-0002nC-GG for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:01:16 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!s19g2000vbr.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 150.227.15.253 Original-X-Trace: posting.google.com 1286990594 21885 127.0.0.1 (13 Oct 2010 17:23:14 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 13 Oct 2010 17:23:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s19g2000vbr.googlegroups.com; posting-host=150.227.15.253; posting-account=ytJKAgoAAAA1tg4ScoRszebXiIldA5vg User-Agent: G2/1.0 X-HTTP-Via: 1.1 ip1-w.foi.se:8080 (IronPort-WSA/6.3.5-015) X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.553.0 Chrome/8.0.553.0 Safari/534.10, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:181759 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:76698 Archived-At: On 13 Okt, 17:53, p...@informatimago.com (Pascal J. Bourguignon) wrote: > Nordl=F6w writes: > > What is the best way to extract the individual bytes from hexadecimal > > string (output from md5) and using them as input into a call to > > unibyte-string()? > > > I want to use this raw string as a key in a hash table for file types > > and then I don't want to waste space (size halves if we go from a > > hexadecimal string to a raw byte string). > > > Does read() (or some of its variants) support reading raw unibyte > > strings (that may contain zero bytes). > > You can use decode-hex-string instead: > > (decode-hex-string "4142434445464748494a4b4c4d4e4f") > --> "ABCDEFGHIJKLMNO" > > -- > __Pascal Bourguignon__ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0http://www.= informatimago.com/ Thanks, Per