Skip to main content

encode_full_table_bytes

Function encode_full_table_bytes 

Source
pub fn encode_full_table_bytes(table: &[(u32, u32, u32, u32, u8)]) -> Vec<u8> 
Expand description

Encode a FULL fold table for the wasm data section.

Layout: 4-byte LE entry count followed by count * 20 bytes — each entry is (input_cp: u32 LE, out0: u32 LE, out1: u32 LE, out2: u32 LE, out_len: u32 LE). out_len is widened from u8 on the wire to keep the per-entry stride at a clean 20 bytes, matching the runtime helper’s 4 + mid * 20 rebase arithmetic.