Version 2.0

30min: Generating IO code for file formats

Event_large

New file formats are created every day and new programming languages come into being quickly. It is not feasible to write (de)serialization code for all formats in each language. It is better to generate code from a description of the file format.

Most computer programs read and write files. Usually, the translation from bytes in the file to information in the program is coded by hand.

For live communications between programs the situation is better. On the desktop, DBus is most well known example of a protocol with automatic (de)serialization. And for XML files there is XMl Schema and Relax NG. Yet, there is no widely used method for generating code for reading arbitrary binary files and text files.

MSOScheme is a library that translates a description of binary Microsoft Office files into C++ and Java code. It is used in Calligra to translate these files into OpenDocument Format. Binary Microsoft Office files are extremely complex, but using the generated code is easy and safe.

The Data Format Description Language (DFDL) is an open specification to describe file formats.

New data formats are created every day and new programming languages come into being quickly. It is not feasible to write (de)serialization code for all formats in each language. It is better to generate code from a description of the file format.

In this presentation, I'll explain how this works from simple examples.

Info

Day: 2016-09-04
Start time: 10:30
Duration: 00:30
Track: In depth

Links

Files

Feedback

Click here to let us know how you liked this event.