Suppose we want to read the first bytes of a binary file and compare
these with given values, the magic number of a file format or whatever.
According to my literal and perhaps somewhat dumb (or blind) reading of
the Scsh and S48 manuals + the Scheme report, we have to make do with
read-string and char<->integer conversion. However, the manuals don't
seem to say, whether or when we may identify characters (elements of
strings) with bytes (octets), and how char->integer represents characters
as integers (besides preserving order). Char->ascii makes the
representation explicit, but I would nonetheless prefer the manual to be
more specific, and possibly scsh to provide i/o procedures for byte
vectors.
rthappe
|