Serializes an image, little endian: magic FIMG, u32 version (1), u32 flags (1 digest, 2
globals, 4 table slots, 8 context), u32 memory pages, u32 delta pages, then in this order the 32
digest bytes, the context (u32 byte count, then UTF-8), the globals (u32 count, then per entry
u32 index, u8 kind 0 for a number as f64 or 1 for a bigint as i64, 8 value bytes), the table
slots (u32 count, u32 each), the u32 page indexes and the page bytes.
Serializes an image, little endian: magic
FIMG, u32 version (1), u32 flags (1 digest, 2 globals, 4 table slots, 8 context), u32 memory pages, u32 delta pages, then in this order the 32 digest bytes, the context (u32 byte count, then UTF-8), the globals (u32 count, then per entry u32 index, u8 kind 0 for a number as f64 or 1 for a bigint as i64, 8 value bytes), the table slots (u32 count, u32 each), the u32 page indexes and the page bytes.