|
|
|
|
|
by tialaramex
1136 days ago
|
|
This is once in a while kinda useful, aside from the data layout issue for stuff like a FourCC. Rust has e.g. u32.to_le_bytes() to turn an integer into some (little endian) bytes, but I don't know if there's a trivial way to write the opposite and turn b"1ert" (which is an array of four bytes) into a native integer. Edited to Add: oh yeah, it has u32.from_le_bytes(b"1ert"). I should have checked. |
|