Raw data structure serializer

Description

A small and lightweight C only (C90 only) library that allows fast serialization of arbitrary C data types graphs. (The accent is on **small** and **efficient**.)

The library provides the following features:

serialization:
  • it takes as input an arbitrary pointer (that could point to a structure, union, array, value (like int, char), another pointer, and any other combination thereof);

  • it is given a memory block that should be used to store the output;
  • it encodes the given data structure graph in that memory block;
deserialization:
  • the converse of the above;
memory in-place execution:
  • for serialization: given that all the data structure graph backing memory forms already a compact memory block (i.e. the pointers aren't "sprinkled" all over the memory address space), the serialization should be able to reuse the same memory;
  • for deserialization: the converse of the above (i.e. the memory backing the deserialized data structure graph should be inside the memory block given as input for the deserialization);

Use cases

embedded devices:
  • ...
MPI-based applications:
  • ...
memory mapped files holding large constant data:
  • ...
input / output data encoding:
  • ...
data structure graph validation:
  • ...

Requirements and constraints

C90 only compliant:
  • ...
lightweight library:
  • ...
memory in-place execution:
  • ...
not relying on compile time code generation:
  • ...

Assumptions

...

Proposed solution

...

Issues