chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Reading binary files


From: Magnus Therning
Subject: [Chicken-users] Reading binary files
Date: Fri, 20 Feb 2004 23:13:13 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

My first post :-)

I need to read a file that has the following basic layout:

 table-size - 32 bits
 [ frequency - 32 bits
   byte - 8 bits]+
 message-size - 32 bits
 message ...

Now, the problem I have is that I have never used scheme for programming
on this low level before -- I have never had to read a specific number
of bytes from a file and convert those bytes to an integer. I can't find
any information on how to do it, I guess SRFI-4 is related, but from the
webpage that the chicken manual refers to[1] I can't figure it out. I
also can't find any kind of read-byte, read-32bits, or similar function
in the manual.

I'd be glad for any pointers :-)

/M

1. http://srfi.schemers.org/srfi-4/srfi-4.html

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
address@hidden
http://magnus.therning.org/

Advice is what we ask for when we already know the answer but wish we
didn't.
     -- Erica Jong

Attachment: signature.asc
Description: Digital signature


reply via email to

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