Skip to content

Bit-precise encode/decode? #20

@nathaniel-bennett

Description

@nathaniel-bennett

First off, I wanted to say that this is an amazing piece of work--well done! I've always thought there should be some kind of protocol description language for auto-generating parsers with better flexibility than protobuf/ASN.1 for existing protocols, and you all went ahead and made a formally-verified one!

I'm interested to find out if vest supports bit-precise fields, or whether adding such support would be straightforward or not. If I had a protocol that defined distinct fields chunked as a four bit, a two bit and two one-bit fields, would vest be able to enforce constraints on these fields or would it treat them as a single u8? As a more extreme example, if a protocol encoded seven-bit ASCII into a byte array with a variable-sized length field prepended to it, could I model this kind of constraint (or at least parse out the length field) with vest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions