ronds-metadata 1.3.47 → 1.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,9 +23,11 @@ function transBase642byte(base64String) {
|
|
|
23
23
|
return uint8Array;
|
|
24
24
|
}
|
|
25
25
|
function transUint8Array2Int(uint8Array, start, end) {
|
|
26
|
-
|
|
26
|
+
var reversedBytes = Array.from(uint8Array.slice(start, end)).reverse();
|
|
27
|
+
var binaryString = reversedBytes.map(function (byte) {
|
|
27
28
|
return byte.toString(2).padStart(8, '0');
|
|
28
|
-
}).join('')
|
|
29
|
+
}).join('');
|
|
30
|
+
return parseInt(binaryString, 2);
|
|
29
31
|
}
|
|
30
32
|
export function transProtobuf2Json(pbData, protoSchema, message) {
|
|
31
33
|
var root = protobuf.parse(protoSchema, {
|