Reading a structured binary file?

John Colvin john.loughran.colvin at gmail.com
Fri Aug 2 10:57:02 PDT 2013


On Friday, 2 August 2013 at 17:49:55 UTC, Gary Willoughby wrote:
> What library commands do i use to read from a structured binary 
> file? I want to read the byte stream 1, 2 maybe 4 bytes at a 
> time and cast these to bytes, shorts and ints respectively. I 
> can't seem to find anything like readByte().

How big is the file?

If it's not too huge i'd just read it in with std.file.read and 
then sort out splitting it up from there.


More information about the Digitalmars-d-learn mailing list