Introduction

Design goals

There are a few C++ bencode projects available online but many are limited in scope. The goal of this library is to provide first class support for bencode and to provide all features expected of a modern C++ serialization/deserialization library.

Features

  • Convenient owning representation of bencoded data with bvalue.

  • Fast and memory efficient read-only, non-owning representation into stable buffers of bencoded data with bview.

  • Build-in serialization/deserializaton for most standard containers.

  • Support for serializing/deserializing to/from user-defined types.

  • Parse directly to custom types by satisfying the EventConsumer concept.

  • Throwing and non throwing variants of common functions.

  • Bencode pointer similar to json pointer.

Requirements

Compiler support

This library requires C++20. Compiler support is limited to GCC 10 and MinGW-w64 10 at the moment.

Dependencies

This library depends on following projects:

When building tests:

When building benchmarks:

When building documentation:

All dependencies for building tests and benchmarks can be fetched from github using cmake FetchContent during configuration if no local installation is found.