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

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

Emacs Lisp - Reading a sequence of bytes as one integer


From: Jeff Clough
Subject: Emacs Lisp - Reading a sequence of bytes as one integer
Date: Sat, 13 Mar 2010 11:56:17 -0500 (EST)

Hey now,

I'm stumbling through a project with elisp (mostly as an excuse to use
it again) and I'm stuck on something.

I have a (mostly) binary file I want to inspect.  There are several
places in this file where I want to read a series of bytes (in this
case, three consecutive bytes) and treat those bytes as a single
integer.  I can grab them as a buffer-substring obviously, but I'm at
a loss for how to make that into the integer I need, nor can I find
anything obvious that would be easier.

This is probably something ridiculously simple and clearly explained
somewhere, but I'm already going cross-eyed and my Google is failing
me.

Thanks for any help you can give.

Jeff





reply via email to

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