messagepack
messagepack copied to clipboard
Add packUint8List() and unpackUint8List() methods
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).
I also think that (un)?packBinary
should be taking/returning Uint8List
to avoid the overhead of converting other types of lists to Uint8List
.