GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Serialization

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — protozero Alternatives - C++ Serialization | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

protozero

Minimalist protocol buffer decoder and encoder in C++

mapbox logo
Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
4.4
Growing
Activity
7.2
-
Stars 381
Watchers 117
Forks 83
Last Commit 10 days ago

Description

Minimalistic protocol buffer decoder and encoder in C++.

Designed for high performance. Suitable for writing zero copy parsers and encoders with minimal need for run-time allocation of memory.

Low-level: this is designed to be a building block for writing a very customized decoder for a stable protobuf schema. If your protobuf schema is changing frequently or lazy decoding is not critical for your application then this approach offers no value: just use the decoding API available via the C++ API that can be generated via the Google Protobufs protoc program.

Code Quality Rank: L2
Programming language: C++
License: BSD 2-clause "Simplified" License
Tags: Serialization     Parsing     File Format    
Latest version: v1.7.1

protozero alternatives and similar libraries

Based on the "Serialization" category.
Alternatively, view protozero alternatives based on common mentions on social networks and blogs.

  • protobuf

    10.0 9.9 L1 protozero VS protobuf
    Protocol Buffers - Google's data interchange format
    protocolbuffers logo
  • FlatBuffers

    9.6 8.0 L1 protozero VS FlatBuffers
    FlatBuffers: Memory Efficient Serialization Library
    google logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • Magic Enum C++

    8.3 8.7 protozero VS Magic Enum C++
    Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
    Neargye logo
  • cereal

    8.1 4.6 L2 protozero VS cereal
    A C++11 library for serialization
    USCiLab logo
  • MessagePack

    7.8 2.7 L1 protozero VS MessagePack
    MessagePack implementation for C and C++ / msgpack.org[C/C++]
    msgpack logo
  • SimpleBinaryEncoding

    7.7 9.0 L1 protozero VS SimpleBinaryEncoding
    Simple Binary Encoding (SBE) - High Performance Message Codec
    aeron-io logo
  • protobuf-c

    7.5 0.0 L2 protozero VS protobuf-c
    Protocol Buffers implementation in C
    protobuf-c logo
  • Bond

    7.2 7.0 L3 protozero VS Bond
    DISCONTINUED. Bond was a cross-platform framework for working with schematized data. The open-source project ended on March 31, 2025.
    microsoft logo
  • Nameof C++

    6.6 8.7 protozero VS Nameof C++
    Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
    Neargye logo
  • Simple C++ Serialization & Reflection.

    6.5 6.6 protozero VS Simple C++ Serialization & Reflection.
    Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.
    felixguendling logo
  • Bitsery

    5.4 5.0 protozero VS Bitsery
    Your binary serialization library
    fraillt logo
  • cppcodec

    4.7 0.0 L2 protozero VS cppcodec
    Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.
    tplgy logo
  • The IOD Library

    4.6 0.0 L2 protozero VS The IOD Library
    Meta programming utilities for C++14. Merged in matt-42/lithium
    matt-42 logo
  • smf

    4.6 0.0 protozero VS smf
    Fastest RPC in the west
    smfrpc logo
  • Boost.Serialization

    3.6 8.3 L3 protozero VS Boost.Serialization
    Boost.org serialization module
    boostorg logo
  • config-loader

    3.3 2.0 protozero VS config-loader
    Simple C++ Config Loader Framework(Serialization & Reflection)
    netcan logo
  • LeapSerial

    2.5 0.0 L4 protozero VS LeapSerial
    The Leap Motion cross-format, cross-platform declarative serialization library
    leapmotion logo
  • cppbor

    1.5 0.0 protozero VS cppbor
    An implementation of cbor using C++ 17 variants
    RantyDave logo
  • JsonFusion

    1.4 8.7 protozero VS JsonFusion
    Map structures to/from json
    tucher logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of protozero or a related project?

Add another 'Serialization' Library

Popular Comparisons

  • protozero
    vs
    protobuf
  • protozero
    vs
    Magic Enum C++
  • protozero
    vs
    FlatBuffers
  • protozero
    vs
    Nameof C++
  • protozero
    vs
    cppcodec

README

protozero

Minimalistic protocol buffer decoder and encoder in C++.

Designed for high performance. Suitable for writing zero copy parsers and encoders with minimal need for run-time allocation of memory.

Low-level: this is designed to be a building block for writing a very customized decoder for a stable protobuf schema. If your protobuf schema is changing frequently or lazy decoding is not critical for your application then this approach offers no value: just use the C++ API that can be generated with the Google Protobufs protoc program.

Travis Build Status Appveyor Build Status Coverage Status Packaging status

Depends

  • C++11 compiler
  • CMake
  • Some tests depend on the Google Protobuf library, but use of Protozero doesn't need it

How it works

The protozero code does not read .proto files used by the usual Protobuf implementations. The developer using protozero has to manually "translate" the .proto description into code. This means there is no way to access any of the information from the .proto description. This results in a few restrictions:

  • The names of the fields are not available.
  • Enum names are not available, you'll have to use the values they are defined with.
  • Default values are not available.
  • Field types have to be hardcoded. The library does not know which types to expect, so the user of the library has to supply the right types. Some checks are made using assert(), but mostly the user has to take care of that.

The library will make sure not to overrun the buffer it was given, but basically all other checks have to be made in user code!

Documentation

You have to have a working knowledge of how protocol buffer encoding works.

  • Read the [tutorial](doc/tutorial.md) for an introduction on how to use Protozero.
  • Some advanced topics are described in an [extra document](doc/advanced.md).
  • There is a table of all types and functions in the [cheat sheet](doc/cheatsheet.md).
  • Read the [upgrading instructions](UPGRADING.md) if you are upgrading from an older version of Protozero.

The build process will also build the Doxygen-based reference documentation if you have Doxygen installed. Then open doc/html/index.html in your browser to read it.

Endianness

Protozero uses a very simplistic test to check the byte order of the system it compiles on. If this check is wrong, you'll get test failures. If this is the case, please open an issue and tell us about your system.

Building tests

Extensive tests are included. Build them using CMake:

mkdir build
cd build
cmake ..
make

Call ctest to run the tests.

The unit and reader tests are always build, the writer tests are only build if the Google Protobuf library is found when running CMake.

See test/README.md for more details about the test.

Coverage report

To get a coverage report set CXXFLAGS and LDFLAGS before calling CMake:

CXXFLAGS="--coverage" LDFLAGS="--coverage" cmake ..

Then call make as usual and run the tests using ctest.

If you are using g++ use gcov to generate a report (results are in *.gcov files):

gcov -lp $(find test/ -name '*.o')

If you are using clang++ use llvm-cov instead:

llvm-cov gcov -lp $(find test/ -name '*.o')

If you are using g++ you can use gcovr to generate nice HTML output:

mkdir -p coverage
gcovr . -r SRCDIR --html --html-details -o coverage/index.html

Open coverage/index.html in your browser to see the report.

Clang-tidy

After the CMake step, run

make clang-tidy

to check the code with clang-tidy. You might have to set CLANG_TIDY in CMake config.

Cppcheck

For extra checks with Cppcheck you can, after the CMake step, call

make cppcheck

Installation

After the CMake step, call make install to install the include files in /usr/local/include/protozero.

If you are using CMake to build your own software, you can copy the file cmake/FindProtozero.cmake and use it in your build. See the file for details.

Who is using Protozero?

  • Carmen
  • Libosmium
  • Mapbox GL Native
  • Mapbox Vector Tile library
  • Mapnik
  • OSRM
  • Tippecanoe
  • Vtzero

Are you using Protozero? Tell us! Send a pull request with changes to this README.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.