compat.wuffs
#includeWuffs — 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
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// 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 · 项目 tests/examples/wuffs
构建
- targets
wuffs (lib)- language
c++23- import std
- no
- include dirs
*/release/c
源文件 (1)
mcpp_generated/wuffs_impl.cc
生成的文件
mcpp_generated/wuffs_impl.cc