decode<T> function

T decode<T>(
  1. PayloadType<T> type,
  2. Uint8List bytes
)

Decodes bytes into a value using type.

Implementation

T decode<T>(binarize.PayloadType<T> type, Uint8List bytes) {
  return type.get(binarize.ByteReader(bytes));
}