mcpp index

compat.wuffs

#include

Wuffs — memory-safe decoders for untrusted formats (PNG, GIF, BMP, DEFLATE, gzip, JSON …), C API plus wuffs_aux C++

#include <wuffs-v0.3.c>
mcpp add compat.wuffs@0.3.6

Usage

From this repository's own test project — built and run by CI, not written for the website.

// compat.wuffs — Wuffs' decoders on data whose decoding is known.
//
// WHAT THIS ASSERTS AND WHY
//
// The package is one translation unit, wuffs-v0.3.c under WUFFS_IMPLEMENTATION
// compiled as C++. That claim has two halves, and each check below needs one:
//
//   the release        WUFFS_VERSION_STRING is 0.3.6's, and the header the
//                      consumer includes is the file the library was built from
//   the C API          gzip (DEFLATE under its framing) decoded by
//                      wuffs_gzip__decoder, CRC-32 and Adler-32 by their hashers,
//                      each with the standard check value
//   wuffs_aux (C++)    a PNG decoded by DecodeImage to BGRA pixels, JSON walked
//                      by DecodeJson — these exist only if the implementation
//                      was compiled as C++, which a C build would silently drop
//
// The error path is checked too: a truncated PNG is refused with Wuffs' own
// status message, not decoded into garbage.

#include <wuffs-v0.3.c>

#include <cstdint>
// …

tests/examples/wuffs/tests/wuffs.cpp · project tests/examples/wuffs

Build

targets
wuffs (lib)
language
c++23
import std
no
include dirs
*/release/c

Sources (1)

  • mcpp_generated/wuffs_impl.cc

Generated files

  • mcpp_generated/wuffs_impl.cc

Versions

VersionPlatforms Mirrorssha256
0.3.6 latest LinuxWindowsmacOS CN GLOBAL e669099e0f67…