Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode error when source is too large #170

Open
203Null opened this issue Aug 2, 2022 · 4 comments
Open

Encode error when source is too large #170

203Null opened this issue Aug 2, 2022 · 4 comments

Comments

@203Null
Copy link

203Null commented Aug 2, 2022

image
When the file length exceeds a size of around 16KB. the encoded data does will not increase anymore. The data generated is corrupted and can not be decoded.

@203Null
Copy link
Author

203Null commented Aug 2, 2022

The default "highWaterMark" of noFilter is 16384 and it overflowed. Need an option to change it

@hildjj
Copy link
Owner

hildjj commented Aug 2, 2022

https://github.com/hildjj/node-cbor/tree/main/packages/cbor#highwatermark

If this needs anything else let me know.

@203Null
Copy link
Author

203Null commented Aug 2, 2022

https://github.com/hildjj/node-cbor/tree/main/packages/cbor#highwatermark

If this needs anything else let me know.

Thank you, probably should have checked cbor repo. However I think it might be good to raise a warning when overflow.

@hildjj
Copy link
Owner

hildjj commented Aug 2, 2022

I'd take a patch for that, but I'm not sure it's easy to figure out the difference when you're in streaming mode and the backpressure is valid.

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

No branches or pull requests

2 participants