4-char box type comparison
| 21 | |
| 22 | // 4-char box type comparison |
| 23 | inline bool boxIs(fl::span<const fl::u8> data, fl::size offset, const char* type) { |
| 24 | if (offset + 4 > data.size()) return false; |
| 25 | return data[offset] == fl::u8(type[0]) && |
| 26 | data[offset + 1] == fl::u8(type[1]) && |
| 27 | data[offset + 2] == fl::u8(type[2]) && |
| 28 | data[offset + 3] == fl::u8(type[3]); |
| 29 | } |
| 30 | |
| 31 | // Find a top-level box by type within a range. Returns offset of box start, or ~0 if not found. |
| 32 | fl::size findBox(fl::span<const fl::u8> data, fl::size start, fl::size end, const char* type) { |
no test coverage detected