Skip to content

Conversation

@qnikst
Copy link
Contributor

@qnikst qnikst commented Nov 10, 2025

We support indefinite length bytestring in the Read module.

In order to do it we add two extra variants for bigint deseralization, both puts us to the slow-path to start consumption of the chunks.

This serialization is considered non-canonical thus canonical read rejects is. While specification is silent about it, the cbor.me implementation always converts bigit into a fixed size byte blob.

Fixes #263.

@qnikst qnikst force-pushed the infinite-bignum branch 2 times, most recently from 4c1a0a3 to 6ee5d39 Compare November 12, 2025 11:01
We support indefinite length bytestring in the Read module.

In order to do it we add two extra variants for bigint deseralization,
both puts us to the slow-path to start consumption of the chunks.

This serialization is considered non-canonical thus canonical read
rejects is. While specification is silent about it, the cbor.me
implementation always converts bigit into a fixed size byte blob.

Fixes well-typed#263.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bignum decoding doesn't allow indefinite-length bytestrings

1 participant