[r6rs-discuss] Mixed binary and ascii data in a single file

From: Alan Watson <alan>
Date: Wed, 08 Aug 2007 15:03:12 -0500

Astronomical FITS files also have an ASCII header followed by binary
data. One option is to treat the file as binary and grab the header
character by character. Another is to open the file twice, once as an
ASCII text stream and once as a binary stream, read the header from the
text stream, calculate the length of the header in bytes, offset the
binary stream to the start of the binary data, and finally read the data
from the binary stream.

Regards,

Alan
Received on Wed Aug 08 2007 - 16:03:12 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC