Actually this proposal is quite bad compared to simple &quot;&lt;4 bytes size&gt;&lt;size bytes contents&gt;&quot;. If you use netstrings recursively like djb recommends, you will end up copying &#x2F; reallocing the strings many times. Since your top-level length depends on the lower level length, you cannot send it without actually calculating the whole contents. Asn1 DER has the same issue because of the weird size encoding.<p>RIFF is a bit better <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_Interchange_File_Format" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_Interchange_File_Form...</a> with strict length,tag,contents format.