wuffs: update, add jpeg decoding, add simple tests

This commit is contained in:
Jeffrey C. Ollie
2025-01-01 00:03:29 -06:00
parent 94599102e9
commit 652079b26c
8 changed files with 287 additions and 28 deletions

View File

@@ -1,3 +1,13 @@
const std = @import("std");
const c = @import("c.zig").c;
pub const Error = std.mem.Allocator.Error || error{WuffsError};
pub fn check(log: anytype, status: *const c.struct_wuffs_base__status__struct) error{WuffsError}!void {
if (!c.wuffs_base__status__is_ok(status)) {
const e = c.wuffs_base__status__message(status);
log.warn("decode err={s}", .{e});
return error.WuffsError;
}
}