Source
Map decodeBinaryFrame(List<int> input) { Uint8List data = ByteDataUtil.list2Uint8List(input); if (_unpacker == null) { _unpacker = new Unpacker(data.buffer, data.offsetInBytes); } else { _unpacker.reset(data.buffer, 0); _unpacker.offset = data.offsetInBytes; } Object rslt = _unpacker.unpack(); if (rslt is Map) { return rslt; } _unpacker.data = null; return {}; }