Header-only C++11 library for encoding/decoding base64, base32, hex, and variants with a consistent, flexible API.
cppcodec is a header-only C++11 library for encoding and decoding binary data into text formats like base64, base32, and hex, as defined in RFC 4648 and including Crockford's base32. It solves the need for a reliable, modern C++ implementation of these codecs with a consistent API that avoids common pitfalls like allocation overhead and platform-specific issues.
C++ developers working with data serialization, network protocols, or file formats that require binary-to-text encoding, such as those building web APIs, cryptographic systems, or data storage solutions.
Developers choose cppcodec for its header-only design, which simplifies integration; its support for multiple standardized and practical codec variants; and its flexible, type-safe API that works efficiently with standard C++ containers without extra dependencies.
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.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Simply add include directories without separate compilation or linking, making it easy to drop into any C++11 project, as described in the usage section.
Implements multiple RFC 4648 standards and Crockford's base32 with explicit classes for each variant, ensuring correct and conscious usage per the variants documentation.
Works with raw pointers, std::string, and templated containers like std::vector<uint8_t> without unnecessary allocations, offering convenience and efficiency.
Throws cppcodec::parse_error on invalid input during decoding, providing clear exception-based error management as highlighted in the API section.
The README admits debug builds are 'slower by an order of magnitude' due to template abstractions, which can hinder development and testing workflows.
Heavy template use may prevent compilers from achieving peak performance compared to hand-written or vectorized code, as noted in the philosophy section.
Missing implementations for aspects like Crockford's base32 checksums and has ambiguous padding handling in base32, limiting use cases that rely on these features.