codecs holds webcpp's one contract for converting bytes and typed values to text and back, and any
data through one-shot and stream transformers, for C++20 on every target
webcpp has: native (Linux, macOS, Windows with MSVC),
wasip2, wasip3 and Emscripten. Over that contract it ships eight formats: hex, base32, z-base-32,
base58, base64, bech32, percent-encoding and RFC 7468's armor, every name in webcpp::codecs. It is
header-only and builds on webcpp::secure for its secret and constant-time operations.
Every format is a value (codecs::formats::hex), an operation a function of it
(codecs::encode(format, bytes)), and where a result goes a token, so that a digest is a text held in
place, a key a secret that wipes itself, and a file a stream. Errors are values, and codecs throws
nothing of its own. Its page, doc/codecs.adoc, teaches the formats, the tokens and results,
secrecy, composition, streams, allocators and how to write a format or a transformer, with a program
of example/ for each; its design is the genesis of libraries/codecs in
webcpporg/proposals.
codecs is built inside the webcpp superproject, where it is
the submodule libs/codecs; a program names /webcpp/codecs//codecs, and
/webcpp/codecs//percent for percent-encoding:
exe app : app.cpp /webcpp/codecs//codecs ;
From the superproject's root:
./b2 toolset=clang libs/codecs/test libs/codecs/example
The library's page is built with ./b2 libs/codecs/doc doc and published with webcpp's
documentation, at https://webcpp.org.
Distributed under the Boost Software License, Version 1.0 (LICENSE_1_0.txt).
base58's public conversion, in include/webcpp/codecs/detail/formats/base58.hpp, follows Bitcoin
Core's EncodeBase58 and DecodeBase58 (src/base58.cpp); codecs is BSL-1.0; base58's public
conversion derives from Bitcoin Core's, whose MIT notice is LICENSE-BITCOIN.txt.