On Fri, 03 Oct 2014 14:19:23 +0000
Matt via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

also you can use my iv.io module to reading binary numbers:
http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/io.d

like this:

  auto offs = file.readNum!uint();

this is endian-safe too (in the sense that it assumes that file data is
little-endian).

or, if you want to do it dirty, replace your readf with this:

  file.rawRead((&offs)[0..1]);

Attachment: signature.asc
Description: PGP signature

Reply via email to