bireader 3.1.1 → 3.1.2
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 +1 -1
- package/dist/core/BiBase.d.ts +38 -48
- package/dist/core/BiBaseStream.d.ts +10 -10
- package/dist/index.browser.d.ts +38 -7
- package/dist/index.browser.js +96 -46
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.d.ts +48 -17
- package/dist/index.cjs.js +142 -109
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +48 -17
- package/dist/index.esm.d.ts +48 -17
- package/dist/index.esm.js +142 -109
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.json +0 -15
package/dist/index.d.ts
CHANGED
|
@@ -118,9 +118,9 @@ declare class BiBase {
|
|
|
118
118
|
errorDump: boolean;
|
|
119
119
|
/**
|
|
120
120
|
* Current buffer data.
|
|
121
|
-
* @type {Buffer|Uint8Array}
|
|
121
|
+
* @type {Buffer|Uint8Array|null}
|
|
122
122
|
*/
|
|
123
|
-
data:
|
|
123
|
+
data: Buffer | Uint8Array | null;
|
|
124
124
|
/**
|
|
125
125
|
* When the data buffer needs to be extended while strict mode is ``false``, this will be the amount it extends.
|
|
126
126
|
*
|
|
@@ -131,18 +131,53 @@ declare class BiBase {
|
|
|
131
131
|
* NOTE: Using ``BiWriter.get`` or ``BiWriter.return`` will now remove all data after the current write position. Use ``BiWriter.data`` to get the full buffer instead.
|
|
132
132
|
*/
|
|
133
133
|
extendBufferSize: number;
|
|
134
|
+
fd: any;
|
|
135
|
+
filePath: string;
|
|
136
|
+
fsMode: string;
|
|
134
137
|
/**
|
|
135
138
|
* The settings that used when using the .str getter / setter
|
|
136
139
|
*/
|
|
137
140
|
private strDefaults;
|
|
141
|
+
maxFileSize: number | null;
|
|
142
|
+
constructor();
|
|
138
143
|
/**
|
|
139
144
|
* Settings for when using .str
|
|
140
145
|
*
|
|
141
146
|
* @param {stringOptions} settings options to use with .str
|
|
142
147
|
*/
|
|
143
148
|
set strSettings(settings: stringOptions);
|
|
144
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Enables expanding in reader (changes strict)
|
|
151
|
+
*
|
|
152
|
+
* @param {boolean} mode - Enable expanding in reader (changes strict)
|
|
153
|
+
*/
|
|
154
|
+
writeMode(mode: boolean): void;
|
|
155
|
+
/**
|
|
156
|
+
* Dummy function, not needed on Non-Stream
|
|
157
|
+
*/
|
|
158
|
+
open(): number;
|
|
159
|
+
/**
|
|
160
|
+
* Dummy function, not needed on Non-Stream
|
|
161
|
+
*/
|
|
162
|
+
updateSize(): void;
|
|
163
|
+
/**
|
|
164
|
+
* removes data.
|
|
165
|
+
*/
|
|
166
|
+
close(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Dummy function, not needed on Non-Stream
|
|
169
|
+
*/
|
|
170
|
+
read(start: number, length: number, consume?: boolean): Buffer | Uint8Array;
|
|
171
|
+
/**
|
|
172
|
+
* Dummy function, not needed on Non-Stream
|
|
173
|
+
*/
|
|
174
|
+
write(start: number, data: Buffer, consume?: boolean): number;
|
|
175
|
+
/**
|
|
176
|
+
* Dummy function, not needed on Non-Stream
|
|
177
|
+
*/
|
|
178
|
+
commit(consume?: boolean): number;
|
|
145
179
|
extendArray(to_padd: number): void;
|
|
180
|
+
isBufferOrUint8Array(obj: Buffer | Uint8Array): boolean;
|
|
146
181
|
/**
|
|
147
182
|
*
|
|
148
183
|
* Change endian, defaults to little.
|
|
@@ -383,10 +418,6 @@ declare class BiBase {
|
|
|
383
418
|
* removes data.
|
|
384
419
|
*/
|
|
385
420
|
end(): void;
|
|
386
|
-
/**
|
|
387
|
-
* removes data.
|
|
388
|
-
*/
|
|
389
|
-
close(): void;
|
|
390
421
|
/**
|
|
391
422
|
* removes data.
|
|
392
423
|
*/
|
|
@@ -1424,7 +1455,7 @@ declare class BiBaseStreamer {
|
|
|
1424
1455
|
/**
|
|
1425
1456
|
* Current buffer chunk.
|
|
1426
1457
|
*
|
|
1427
|
-
* @type {Buffer}
|
|
1458
|
+
* @type {Buffer|null}
|
|
1428
1459
|
*/
|
|
1429
1460
|
data: Buffer | null;
|
|
1430
1461
|
/**
|
|
@@ -1718,15 +1749,15 @@ declare class BiBaseStreamer {
|
|
|
1718
1749
|
*/
|
|
1719
1750
|
get return(): Buffer;
|
|
1720
1751
|
/**
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1752
|
+
* Creates hex dump string. Will console log or return string if set in options.
|
|
1753
|
+
*
|
|
1754
|
+
* @param {object} options
|
|
1755
|
+
* @param {hexdumpOptions?} options - hex dump options
|
|
1756
|
+
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
1757
|
+
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
1758
|
+
* @param {boolean?} options.supressUnicode - Supress unicode character preview for even columns.
|
|
1759
|
+
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
1760
|
+
*/
|
|
1730
1761
|
hexdump(options?: hexdumpOptions): void | string;
|
|
1731
1762
|
/**
|
|
1732
1763
|
* Turn hexdump on error off (default on).
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -118,9 +118,9 @@ declare class BiBase {
|
|
|
118
118
|
errorDump: boolean;
|
|
119
119
|
/**
|
|
120
120
|
* Current buffer data.
|
|
121
|
-
* @type {Buffer|Uint8Array}
|
|
121
|
+
* @type {Buffer|Uint8Array|null}
|
|
122
122
|
*/
|
|
123
|
-
data:
|
|
123
|
+
data: Buffer | Uint8Array | null;
|
|
124
124
|
/**
|
|
125
125
|
* When the data buffer needs to be extended while strict mode is ``false``, this will be the amount it extends.
|
|
126
126
|
*
|
|
@@ -131,18 +131,53 @@ declare class BiBase {
|
|
|
131
131
|
* NOTE: Using ``BiWriter.get`` or ``BiWriter.return`` will now remove all data after the current write position. Use ``BiWriter.data`` to get the full buffer instead.
|
|
132
132
|
*/
|
|
133
133
|
extendBufferSize: number;
|
|
134
|
+
fd: any;
|
|
135
|
+
filePath: string;
|
|
136
|
+
fsMode: string;
|
|
134
137
|
/**
|
|
135
138
|
* The settings that used when using the .str getter / setter
|
|
136
139
|
*/
|
|
137
140
|
private strDefaults;
|
|
141
|
+
maxFileSize: number | null;
|
|
142
|
+
constructor();
|
|
138
143
|
/**
|
|
139
144
|
* Settings for when using .str
|
|
140
145
|
*
|
|
141
146
|
* @param {stringOptions} settings options to use with .str
|
|
142
147
|
*/
|
|
143
148
|
set strSettings(settings: stringOptions);
|
|
144
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Enables expanding in reader (changes strict)
|
|
151
|
+
*
|
|
152
|
+
* @param {boolean} mode - Enable expanding in reader (changes strict)
|
|
153
|
+
*/
|
|
154
|
+
writeMode(mode: boolean): void;
|
|
155
|
+
/**
|
|
156
|
+
* Dummy function, not needed on Non-Stream
|
|
157
|
+
*/
|
|
158
|
+
open(): number;
|
|
159
|
+
/**
|
|
160
|
+
* Dummy function, not needed on Non-Stream
|
|
161
|
+
*/
|
|
162
|
+
updateSize(): void;
|
|
163
|
+
/**
|
|
164
|
+
* removes data.
|
|
165
|
+
*/
|
|
166
|
+
close(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Dummy function, not needed on Non-Stream
|
|
169
|
+
*/
|
|
170
|
+
read(start: number, length: number, consume?: boolean): Buffer | Uint8Array;
|
|
171
|
+
/**
|
|
172
|
+
* Dummy function, not needed on Non-Stream
|
|
173
|
+
*/
|
|
174
|
+
write(start: number, data: Buffer, consume?: boolean): number;
|
|
175
|
+
/**
|
|
176
|
+
* Dummy function, not needed on Non-Stream
|
|
177
|
+
*/
|
|
178
|
+
commit(consume?: boolean): number;
|
|
145
179
|
extendArray(to_padd: number): void;
|
|
180
|
+
isBufferOrUint8Array(obj: Buffer | Uint8Array): boolean;
|
|
146
181
|
/**
|
|
147
182
|
*
|
|
148
183
|
* Change endian, defaults to little.
|
|
@@ -383,10 +418,6 @@ declare class BiBase {
|
|
|
383
418
|
* removes data.
|
|
384
419
|
*/
|
|
385
420
|
end(): void;
|
|
386
|
-
/**
|
|
387
|
-
* removes data.
|
|
388
|
-
*/
|
|
389
|
-
close(): void;
|
|
390
421
|
/**
|
|
391
422
|
* removes data.
|
|
392
423
|
*/
|
|
@@ -1424,7 +1455,7 @@ declare class BiBaseStreamer {
|
|
|
1424
1455
|
/**
|
|
1425
1456
|
* Current buffer chunk.
|
|
1426
1457
|
*
|
|
1427
|
-
* @type {Buffer}
|
|
1458
|
+
* @type {Buffer|null}
|
|
1428
1459
|
*/
|
|
1429
1460
|
data: Buffer | null;
|
|
1430
1461
|
/**
|
|
@@ -1718,15 +1749,15 @@ declare class BiBaseStreamer {
|
|
|
1718
1749
|
*/
|
|
1719
1750
|
get return(): Buffer;
|
|
1720
1751
|
/**
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1752
|
+
* Creates hex dump string. Will console log or return string if set in options.
|
|
1753
|
+
*
|
|
1754
|
+
* @param {object} options
|
|
1755
|
+
* @param {hexdumpOptions?} options - hex dump options
|
|
1756
|
+
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
1757
|
+
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
1758
|
+
* @param {boolean?} options.supressUnicode - Supress unicode character preview for even columns.
|
|
1759
|
+
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
1760
|
+
*/
|
|
1730
1761
|
hexdump(options?: hexdumpOptions): void | string;
|
|
1731
1762
|
/**
|
|
1732
1763
|
* Turn hexdump on error off (default on).
|