| 15 | } |
| 16 | |
| 17 | inline fl::u16 readU16BE(fl::span<const fl::u8> data, fl::size offset, bool& ok) { |
| 18 | if (offset + 2 > data.size()) { ok = false; return 0; } |
| 19 | return (fl::u16(data[offset]) << 8) | fl::u16(data[offset + 1]); |
| 20 | } |
| 21 | |
| 22 | // 4-char box type comparison |
| 23 | inline bool boxIs(fl::span<const fl::u8> data, fl::size offset, const char* type) { |