Closed rvagg closed 4 years ago
Same as https://github.com/ipld/js-ipld-dag-cbor/pull/130
The streaming form of CBOR (3.1) may use back-to-back top-level objects without an explicit container and borc will decode this without failure. decodeFirst() will only return the first of these but additional data may exist but be hidden.
decodeFirst()
Ref: https://github.com/ipld/js-ipld-dag-cbor/pull/130 Ref: https://github.com/dignifiedquire/borc/issues/47#issuecomment-642432759 Ref: https://github.com/ipld/specs/pull/268
cherry-picked to master as 27a3617
Same as https://github.com/ipld/js-ipld-dag-cbor/pull/130
The streaming form of CBOR (3.1) may use back-to-back top-level objects without an explicit container and borc will decode this without failure.
decodeFirst()
will only return the first of these but additional data may exist but be hidden.Ref: https://github.com/ipld/js-ipld-dag-cbor/pull/130 Ref: https://github.com/dignifiedquire/borc/issues/47#issuecomment-642432759 Ref: https://github.com/ipld/specs/pull/268