ronds-metadata 1.3.47 → 1.3.48
Sign up to get free protection for your applications and to get access to all the features.
@@ -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, {
|