This is a work-in-progress and not battle-tested yet.
Include cbor-js and this plugin in your page:
Then register the decoder and you're ready to go:
How does it work?
Numeric typed arrays in CBOR can be encoded by using tags as defined in the soon-to-be-RFC draft-jroatch-cbor-tags-02. Compared to standard arrays, they use less space (1 byte less per array element) and are faster to decode.
In the unlikely case that the platform endianness where the decoder is running does not match the one used when encoding, a fast byte swapping on the original array data is done using optimized for-loops for each bit length.