made a mediocre qoi decoder in zig to learn the language. feel free to yell at me if i did the code wrong

git.gay/kopper/zig-qoi

#zig
kopper/zig-qoi

my attempt at learning zig by making a qoi decoder. you're on your own if you use this code

git.gay
Note that per github.com/ziglang/zig/issues/19755, vectors in packed structs are going to be removed from the languageawww i use those to try simd-ing the values i parse directly without having to convert them first thats kinda sad
Proposal: initial `@bitCast` semantics (packed + vector + array) · Issue #19755 · ziglang/zig

This is a partial resurrection of #10547 with an initially reduced scope and taking into account the packed struct changes since then. The status quo implementation of @bitSizeOf and @bitCast are i...

GitHub
is it any faster? no clue but it looks cool
Because the optimal vector representation is highly target-dependent, it’s intended that vectors have ill-defined layout, meaning nothing about their in-memory representation, including their @sizeOf/@alignOf, is guaranteed.aw ok
@kopper Time to register the accounts @sizeOf and @alignOf /j