bigeasy / packet

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

Allow collapsed nested structures and packed integers. #588

Closed bigeasy closed 2 years ago

bigeasy commented 4 years ago
const definition = {
    _header: [{
        type: 4,
        length: 4
    }, 8 ]
}

In the above, instead of creating a _header structure, we just assign a type and length property to the parsed object.