What is the D way to map a binary file to a structure?

cym13 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 29 08:05:50 PDT 2015


On Saturday, 29 August 2015 at 14:52:51 UTC, drug wrote:
> 29.08.2015 17:17, cym13 пишет:
>> On Saturday, 29 August 2015 at 13:56:10 UTC, drug wrote:
>>> Try, for example, MessagePack 
>>> https://github.com/msgpack/msgpack-d.git
>>
>> Thanks, but it isn't answering the question at all. I'm not 
>> looking for a
>> serialization method, I'm looking for the best way to read a 
>> binary file.
>>
> It depends on what is the best for you. But using MessagePack 
> you can easily read the file and fill a structure with it.

No, because messagepack is one format of binary file. That isn't 
going to be of any help for any other binary file format. It is 
not a way to read binary files. It is a serialization format.


More information about the Digitalmars-d-learn mailing list