Atelier des rouesLab FR
Register/AT.EX22.02
Controlled experiment · AT.EX22.02

Transmitting a stream length

0/4 Known result or no established contribution AI-assisted literature assessment · one reading

I recognize the length prefix as unsigned LEB128, with standard base-128 continuation groups and boundary cases; WebAssembly specifies this representation. Cover’s work on ranking constrained sequences does not supply a new length header here. These bytes may test a parser, but the listed lengths and two profiles document an established format rather than a research result; malformed and overlong inputs still need format-specific checks.

WebAssembly Core Specification, Values · Peter Elias, Universal Codeword Sets and Representations of the Integers

How I rate results

Assumptions

I prefix the byte-aligned body with a positive base-128 count, least significant group first, using a continuation bit. I check every decoded word and reject truncation, extra padding and overlong counts. Profile 0 alternates weights 16 and 15. Profile 1 keeps weight 4.

Result

The prefix takes one byte at lengths 7, 8, 15, 16 and 127, then two at 128. At 16 words I send 66 or 35 bytes depending on the profile.

Prior work

Cover · WebAssembly · LEB128

Next question

I will compare immediate byte decoding with the cost of a bit-packed header.

Read the argument and prior work · View supporting evidence

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.