bireader 3.1.5 → 3.1.7
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.
- package/README.md +3 -3
- package/dist/index.browser.d.ts +4 -4
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.d.ts +5 -5
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.d.ts +5 -5
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/BiReader.d.ts +0 -339
- package/dist/BiReaderStream.d.ts +0 -340
- package/dist/BiWriter.d.ts +0 -344
- package/dist/BiWriterStream.d.ts +0 -347
- package/dist/aliases/BinaryAliasReader.d.ts +0 -4678
- package/dist/aliases/BinaryAliasWriter.d.ts +0 -4648
- package/dist/common.d.ts +0 -91
- package/dist/core/BiBase.d.ts +0 -1336
- package/dist/core/BiBaseStream.d.ts +0 -1383
- package/dist/indexBrowser.d.ts +0 -35
- package/dist/indexImport.d.ts +0 -21
package/dist/index.cjs.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ type hexdumpOptions = {
|
|
|
33
33
|
*/
|
|
34
34
|
startByte?: number;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Suppress unicode character preview for even columns.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
suppressUnicode?: boolean;
|
|
39
39
|
/**
|
|
40
40
|
* Returns the hex dump string instead of logging it.
|
|
41
41
|
*/
|
|
@@ -48,7 +48,7 @@ type hexdumpOptions = {
|
|
|
48
48
|
* @param {hexdumpOptions?} options - hex dump options
|
|
49
49
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
50
50
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
51
|
-
* @param {boolean?} options.
|
|
51
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
52
52
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
53
53
|
*/
|
|
54
54
|
declare function hexdump(src: Uint8Array | Buffer, options?: hexdumpOptions): void | string;
|
|
@@ -403,7 +403,7 @@ declare class BiBase {
|
|
|
403
403
|
* @param {hexdumpOptions?} options - hex dump options
|
|
404
404
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
405
405
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
406
|
-
* @param {boolean?} options.
|
|
406
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
407
407
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
408
408
|
*/
|
|
409
409
|
hexdump(options?: hexdumpOptions): void | string;
|
|
@@ -1784,7 +1784,7 @@ declare class BiBaseStreamer {
|
|
|
1784
1784
|
* @param {hexdumpOptions?} options - hex dump options
|
|
1785
1785
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
1786
1786
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
1787
|
-
* @param {boolean?} options.
|
|
1787
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
1788
1788
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
1789
1789
|
*/
|
|
1790
1790
|
hexdump(options?: hexdumpOptions): void | string;
|
package/dist/index.cjs.js
CHANGED
|
@@ -38,7 +38,7 @@ function arraybuffcheck(obj) {
|
|
|
38
38
|
* @param {hexdumpOptions?} options - hex dump options
|
|
39
39
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
40
40
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
41
|
-
* @param {boolean?} options.
|
|
41
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
42
42
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
43
43
|
*/
|
|
44
44
|
function hexdump(src, options = {}) {
|
|
@@ -80,7 +80,7 @@ function _hexDump(data, options = {}, start, end) {
|
|
|
80
80
|
value = value >>> 0;
|
|
81
81
|
return value;
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var suppressUnicode = options && options.suppressUnicode || false;
|
|
84
84
|
const rows = [];
|
|
85
85
|
var header = " 0 1 2 3 4 5 6 7 8 9 A B C D E F ";
|
|
86
86
|
var ending = "0123456789ABCDEF";
|
|
@@ -104,7 +104,7 @@ function _hexDump(data, options = {}, start, end) {
|
|
|
104
104
|
// Convert the byte to a character and add it to the result
|
|
105
105
|
result += String.fromCharCode(byte);
|
|
106
106
|
}
|
|
107
|
-
else if (
|
|
107
|
+
else if (suppressUnicode) {
|
|
108
108
|
result += '.';
|
|
109
109
|
}
|
|
110
110
|
else if (hex_check(byte, 1) == 0) {
|
|
@@ -2166,7 +2166,7 @@ class BiBase {
|
|
|
2166
2166
|
* @param {hexdumpOptions?} options - hex dump options
|
|
2167
2167
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
2168
2168
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
2169
|
-
* @param {boolean?} options.
|
|
2169
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
2170
2170
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
2171
2171
|
*/
|
|
2172
2172
|
hexdump(options = {}) {
|
|
@@ -12489,7 +12489,7 @@ function fFloat(ctx, targetNumber, endian) {
|
|
|
12489
12489
|
return position + z; // Found the number, return the index
|
|
12490
12490
|
}
|
|
12491
12491
|
}
|
|
12492
|
-
position +=
|
|
12492
|
+
position += buffer.length;
|
|
12493
12493
|
}
|
|
12494
12494
|
return -1; // number not found
|
|
12495
12495
|
}
|
|
@@ -12528,7 +12528,7 @@ function fBigInt(ctx, targetNumber, unsigned, endian) {
|
|
|
12528
12528
|
}
|
|
12529
12529
|
// Update the last chunk for the next iteration
|
|
12530
12530
|
lastChunk = combinedBuffer.subarray(-8 + 1);
|
|
12531
|
-
ctx.offset +=
|
|
12531
|
+
ctx.offset += currentChunk.length;
|
|
12532
12532
|
}
|
|
12533
12533
|
return -1; // number not found
|
|
12534
12534
|
}
|
|
@@ -12582,7 +12582,7 @@ function fDoubleFloat(ctx, targetNumber, endian) {
|
|
|
12582
12582
|
return position + z; // Found the number, return the index
|
|
12583
12583
|
}
|
|
12584
12584
|
}
|
|
12585
|
-
position +=
|
|
12585
|
+
position += buffer.length;
|
|
12586
12586
|
}
|
|
12587
12587
|
return -1; // number not found
|
|
12588
12588
|
}
|
|
@@ -13982,7 +13982,7 @@ class BiBaseStreamer {
|
|
|
13982
13982
|
* @param {hexdumpOptions?} options - hex dump options
|
|
13983
13983
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
13984
13984
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
13985
|
-
* @param {boolean?} options.
|
|
13985
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
13986
13986
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
13987
13987
|
*/
|
|
13988
13988
|
hexdump(options = {}) {
|