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

Serialization #37

Open
frank-rollpin opened this issue Oct 4, 2016 · 1 comment
Open

Serialization #37

frank-rollpin opened this issue Oct 4, 2016 · 1 comment

Comments

@frank-rollpin
Copy link

What would be the proper way to serialize BigInteger to byte array, and back? There is a "toByteArray" method, but the "fromBytes" factory accepts two parameters (int signum, List magnitude) - shouldn't this method be modified to accept just bytes?

On a separate subject (don't want to create two threads), I wonder if this project is still maintained/actively used? Just found another library (https://github.com/a14n/dart-rational), and it does look pretty good...

@rinick
Copy link
Contributor

rinick commented Oct 4, 2016

there is a fromByteArray method in the dartvm implementation. we probably should move that to v8 implementation too and add it to public interface.

this library is more optimized if you want to use the same lib for both js and dartvm, because on dartvm it uses the native big int, so it's much faster than any custom structure for big int.

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