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

Add packUint8List() and unpackUint8List() methods #6

Open
claudiofelber opened this issue Jul 12, 2021 · 1 comment
Open

Add packUint8List() and unpackUint8List() methods #6

claudiofelber opened this issue Jul 12, 2021 · 1 comment

Comments

@claudiofelber
Copy link

Thank you for providing this useful package.

Would you mind adding a packUint8List and unpackUint8List method? The reason for this being, that Uint8List is often used in Dart and Flutter (e.g. in StandardMessageCodec). And while Uint8List can be freely cast to List<int>, doing the reverse with Uint8List.fromList comes at a cost.

Maybe, since the package has not yet reached version 1.0 and a breaking change might be justifiable, this could even be rewritten as packBinary and unpackBinary (replacing the current List<int>-based implementation).

@petoknm
Copy link

petoknm commented Jul 30, 2021

I also think that (un)?packBinary should be taking/returning Uint8List to avoid the overhead of converting other types of lists to Uint8List.

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