Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Make cbor Decoder configurable #90

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

brandonwestcott
Copy link
Contributor

This PR is to allow the underlying cbor.Decoder to be configured with additional options, namely the size parameter.

Currently we are using this library to explore an ipld dag - in some cases, errors are raised due to decoding large objects. By allowing the user to configure the size here, they can determine what the size limit for their application should be.

@mikeal
Copy link
Contributor

mikeal commented Feb 12, 2019

Would love to see this land. I have something very similar in dag-cbor-sync
https://github.com/mikeal/dag-cbor-sync/blob/master/index.js#L88 . I’d also love to see the default size raised.

@vmx
Copy link
Member

vmx commented Feb 13, 2019

Thanks a lot for your contribution, that's a great PR. I'll change the commit message when merging as we are following a certain format, so that the changelog can be auto-generated. For me see https://github.com/ipfs/community/blob/250bb162def759abca469442d72182202ab68380/CONTRIBUTING_JS.md#commits.

@vmx vmx merged commit dfb9137 into ipld:master Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants