bigeasy / packet

Incremental binary parsers and serializers for Node.js.
http://bigeasy.github.io/packet
MIT License
186 stars 25 forks source link

Literals should deserialize. #614

Open bigeasy opened 3 years ago

bigeasy commented 3 years ago

We probably want to check them more often than not.

bigeasy commented 3 years ago

Actually, we had the concept of a padding that we don't care about, but that seems rare. Seems like the protocols will ask that you verify that the serialization included a specific padding. We may have space for a "constant" in the form of [ 'aa', 7 ] or [ 'aa', 8 ] and insist on the bits even though it could be inferred. Our literal or padding may not be useful and we can use that language space for something else, or clear it out to prevent any extension ambiguities.