Sign inSign up

alh477/dcf-serialize

By alh477

Updated 8 months ago

Universal Serialization/Deserialization Shim for the DeMoD Communications Framework

Image
Integration & delivery
Developer tools
Data science
0

531

alh477/dcf-serialize repository overview

DCF Serialize

Universal Serialization/Deserialization Shim for the DeMoD Communications Framework

License: BSD-3-Clause Version Docker Image Size (latest) Docker Pulls

Overview

This repository provides Docker images for DCF Serialize, a high-performance, system-agnostic binary serialization library designed for distributed systems, real-time gaming, and IoT applications.

The library is pure C11 with no external dependencies and is built and installed in the images.

Available Tags

  • latest, 5.2.0 — Minimal runtime image with the shared library installed
  • 5.2.0-dev, dev — Development image with build tools (gcc, make, gdb, valgrind, etc.)
  • 5.2.0-test, test — Test runner image (executes the library test suite on start)

Features

  • Platform independent (Linux, macOS, Windows, BSD)
  • Big-endian network byte order with automatic conversion
  • Zero-copy reads where possible
  • Type-safe self-describing format
  • Built-in CRC32 checksum validation
  • Schema/reflection-based struct serialization
  • LEB128 variable-length integer encoding
  • No external library dependencies

Quick Usage

Runtime image (use as base for your application)
FROM alh477/dcf-serialize:latest

# Copy your source and build your app that links against -ldcf_serialize
COPY . /src
WORKDIR /src
RUN gcc -o myapp myapp.c -ldcf_serialize

CMD ["./myapp"]
Development / building locally
docker run --rm -it -v $(pwd):/src alh477/dcf-serialize:dev
# Inside container:
cd /src
make          # or gcc ... -ldcf_serialize
Run tests
docker run --rm alh477/dcf-serialize:test

Wire Format

┌──────────┬─────────┬──────────┬───────┬────────────┬──────────┬──────────┬──────────┐
│  Magic   │ Version │ MsgType  │ Flags │ PayloadLen │ Sequence │ Payload  │  CRC32   │
│  4 bytes │ 2 bytes │ 2 bytes  │ 1 byte│  4 bytes   │  4 bytes │ N bytes  │  4 bytes │
└──────────┴─────────┴──────────┴───────┴────────────┴──────────┴──────────┴──────────┘

API Highlights

The library provides a full serialization/deserialization API in dcf_serialize.h. Key features:

  • Writer/Reader contexts
  • Primitive, string, bytes, array, map, struct support
  • Schema-based reflection for structs
  • Zero-copy reads for strings/bytes
  • CRC32 validation

See the header file in the repository for full documentation.

Source & Contributing

Source code and full documentation:
https://github.com/alh477/dcf-serialize

Issues: https://github.com/alh477/dcf-serialize/issues

Licensed under BSD-3-Clause © 2024-2025 DeMoD LLC.

Contact

Tag summary

Content type

Image

Digest

sha256:9d41d7b7c

Size

11.8 MB

Last updated

8 months ago

docker pull alh477/dcf-serialize