jackson-dataformats-binary icon indicating copy to clipboard operation
jackson-dataformats-binary copied to clipboard

Add support for upcoming packed arrays tags

Open cowtowncoder opened this issue 8 years ago • 2 comments

(originally by neothemachine)


There is a draft RFC to be published soon which adds support for packed/typed arrays in CBOR, see the current version. As one of the original CBOR authors is also an author of this proposal I'm sure it will gain widespread adoption in encoders and decoders, especially because it is such a useful feature and will help greatly when big packed arrays need to be efficiently encoded and also decoded both in terms of space usage and speed.

I thought it would be good putting it on the radar for implementation. I think it will be rather straightforward to implement. I currently don't have time for it myself in the next 3-4 weeks but I certainly will help where I can, reviewing code etc.

cowtowncoder avatar May 03 '16 05:05 cowtowncoder

Quick note: Should be (more) doable with Jackson 2.8, planning to add JsonParser support to make it possibly to efficiently and simply support a small set of "well-known" array types; int[] and long[] at least, but maybe short[] for good measure.

Could be https://github.com/FasterXML/jackson-core/issues/241 or perhaps something even more direct.

cowtowncoder avatar May 03 '16 05:05 cowtowncoder

So, explicit array writes are now included for int[], long[] and double[]: if packed arrays functionality becomes official CBOR feature it should be much easier to support those now.

cowtowncoder avatar May 24 '16 05:05 cowtowncoder