Contents

Data Serialization and Deserialization

oneDAL provides interfaces for serialization and deserialization of data objects, which are an essential technique for data exchange between devices and for implementing data recovery mechanisms on a device failure.

The InputDataArchive class provides interfaces for creation of a serialized object archive. The OutputDataArchive class provides interfaces for deserialization of an object from the archive.

A general structure of an archive is as follows:

The first segment contains the archive header, the last segment contains the archive footer, and all other segments contain a segment header and a segment footer.

Data Archive Structure

Headers and footers contain information required to reconstruct the archived object.

All serializable objects, such as numeric tables, a data dictionary, and models, have serialization and deserialization methods. These methods take input archive and output archive, respectively, as method parameters.

Examples

C++: https://github.com/oneapi-src/oneDAL/tree/main/examples/daal/cpp/source/serialization/serialization.cpp