gnieh / fs2-data

streaming data parsing and transformation library
https://fs2-data.gnieh.org
Apache License 2.0
152 stars 27 forks source link

Improve MessagePack model #618

Closed jarmuszz closed 3 months ago

jarmuszz commented 3 months ago

Current implementation of the MessagePack model allows for creation of malformed objects as the ByteVector class (which underlays most of the types in the model) has a maximum length of Long.MaxValue bytes which is bigger than the specification defines for some types.

This PR proposes following changes:

Ref. #603

jarmuszz commented 3 months ago

I have currently held back from changing the integer types. UnsignedInt would have to hold a BigInt in order to keep a sign which is not quite performant. We could also bit cast it into a Long but I think it would be confusing for users.

ybasket commented 3 months ago

Looks good to me, let's see if @ybasket has some comments.

No, was only waiting for the small fix you had requested. LGTM