FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
310 stars 133 forks source link

[cbor] Write large numbers in uint32 form where possible #200

Closed yawkat closed 4 years ago

yawkat commented 4 years ago

When minimal ints are enabled, the generator will now encode numbers that exceed java int range but still can be encoded as 5 bytes in cbor as such.

cowtowncoder commented 4 years ago

@yawkat I am not 100% sure I understand the issue being fixed here -- would it be possible to create issue to explain the problem (and to include in release notes)?

yawkat commented 4 years ago

I've opened #201. That issue also includes some other ideas on efficient integer representation.

cowtowncoder commented 4 years ago

I ended up merging the solution manually; same checks, test (but added a few other tests for complteness); closing this. Thank you for submitting it!