3 ms·
You can do the same thing using VLQ, with less wastage. Just scan for the next cleared high bit.
by kstenerud 7y ago
You can do the same thing using VLQ, with less wastage. Just scan for the next cleared high bit.
- mirekrusin 7y agoYou can also construct malicious payloads which will DoS many implementations with architecture like that.
- kstenerud 7y agoYou can also trivially defend against that by having a max travel distance of, say, 4.
- ludamad 7y agoIs that guaranteed to catch all valid cases?
- mirekrusin 7y agoExactly, so you arrived at the same conclusion - fixed distance so you can safely pick up stream at arbitrary position.
- kstenerud 7y agoThe difference is that the distance limits would be inherent to the codec itself, rather than taking up extra space in the data stream.