bireader 1.0.25 → 1.0.27

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.
Files changed (36) hide show
  1. package/lib/{esm/types/src/writer.d.ts → cjs/index.d.ts} +3380 -9
  2. package/lib/cjs/index.d.ts.map +1 -0
  3. package/lib/cjs/index.js +10466 -5
  4. package/lib/cjs/index.js.map +1 -1
  5. package/lib/{cjs/types/src/writer.d.ts → esm/index.d.ts} +3380 -9
  6. package/lib/esm/index.d.ts.map +1 -0
  7. package/lib/esm/index.js.map +1 -1
  8. package/lib/esm/index.mjs +10427 -2
  9. package/package.json +7 -4
  10. package/src/index.ts +11344 -0
  11. package/lib/cjs/src/common.js +0 -1400
  12. package/lib/cjs/src/common.js.map +0 -1
  13. package/lib/cjs/src/reader.js +0 -4411
  14. package/lib/cjs/src/reader.js.map +0 -1
  15. package/lib/cjs/src/writer.js +0 -4672
  16. package/lib/cjs/src/writer.js.map +0 -1
  17. package/lib/cjs/types/index.d.ts +0 -3
  18. package/lib/cjs/types/index.d.ts.map +0 -1
  19. package/lib/cjs/types/src/common.d.ts +0 -56
  20. package/lib/cjs/types/src/common.d.ts.map +0 -1
  21. package/lib/cjs/types/src/reader.d.ts +0 -3321
  22. package/lib/cjs/types/src/reader.d.ts.map +0 -1
  23. package/lib/cjs/types/src/writer.d.ts.map +0 -1
  24. package/lib/esm/src/common.js +0 -1363
  25. package/lib/esm/src/common.js.map +0 -1
  26. package/lib/esm/src/reader.js +0 -4407
  27. package/lib/esm/src/reader.js.map +0 -1
  28. package/lib/esm/src/writer.js +0 -4668
  29. package/lib/esm/src/writer.js.map +0 -1
  30. package/lib/esm/types/index.d.ts +0 -3
  31. package/lib/esm/types/index.d.ts.map +0 -1
  32. package/lib/esm/types/src/common.d.ts +0 -56
  33. package/lib/esm/types/src/common.d.ts.map +0 -1
  34. package/lib/esm/types/src/reader.d.ts +0 -3321
  35. package/lib/esm/types/src/reader.d.ts.map +0 -1
  36. package/lib/esm/types/src/writer.d.ts.map +0 -1
@@ -1,4 +1,3377 @@
1
1
  /// <reference types="node" />
2
+ export declare function isBuffer(obj: Array<Buffer | Uint8Array>): boolean;
3
+ export declare function check_size(_this: any, write_bytes: number, write_bit?: number, offset?: number): number;
4
+ export declare function buffcheck(obj: Array<Buffer | Uint8Array>): boolean;
5
+ export declare function arraybuffcheck(_this: any, obj: Array<Buffer | Uint8Array>): boolean;
6
+ export declare function extendarray(_this: any, to_padd: number): void;
7
+ export declare function checkSize(_this: any, write_bytes: number, write_bit?: number, offset?: number): number;
8
+ export declare function skip(_this: any, bytes: number, bits?: number): void;
9
+ export declare function goto(_this: any, byte: number, bit?: number): void;
10
+ export declare function remove(_this: any, startOffset?: number, endOffset?: number, consume?: boolean, remove?: boolean, fillValue?: number): any;
11
+ export declare function addData(_this: any, data: Buffer | Uint8Array, consume?: boolean, offset?: number, repalce?: boolean): void;
12
+ export declare function hexDump(_this: any, options?: {
13
+ length?: number;
14
+ startByte?: number;
15
+ supressUnicode?: boolean;
16
+ }): void;
17
+ export declare function AND(_this: any, and_key: any, start?: number, end?: number, consume?: boolean): any;
18
+ export declare function OR(_this: any, or_key: any, start?: number, end?: number, consume?: boolean): any;
19
+ export declare function XOR(_this: any, xor_key: any, start?: number, end?: number, consume?: boolean): any;
20
+ export declare function NOT(_this: any, start?: number, end?: number, consume?: boolean): any;
21
+ export declare function LSHIFT(_this: any, shift_key: any, start?: number, end?: number, consume?: boolean): any;
22
+ export declare function RSHIFT(_this: any, shift_key: any, start?: number, end?: number, consume?: boolean): any;
23
+ export declare function ADD(_this: any, add_key: any, start?: number, end?: number, consume?: boolean): any;
24
+ export declare function wbit(_this: any, value: number, bits: number, unsigned?: boolean, endian?: string): void;
25
+ export declare function rbit(_this: any, bits?: number, unsigned?: boolean, endian?: string): number;
26
+ export declare function wbyte(_this: any, value: number, unsigned?: boolean): void;
27
+ export declare function rbyte(_this: any, unsigned?: boolean): number;
28
+ export declare function wint16(_this: any, value: number, unsigned?: boolean, endian?: string): void;
29
+ export declare function rint16(_this: any, unsigned?: boolean, endian?: string): number;
30
+ export declare function rhalffloat(_this: any, endian?: string): number;
31
+ export declare function whalffloat(_this: any, value: number, endian?: string): void;
32
+ export declare function wint32(_this: any, value: number, unsigned?: boolean, endian?: string): void;
33
+ export declare function rint32(_this: any, unsigned?: boolean, endian?: string): number;
34
+ export declare function rfloat(_this: any, endian?: string): number;
35
+ export declare function wfloat(_this: any, value: number, endian?: string): void;
36
+ export declare function rint64(_this: any, unsigned?: boolean, endian?: string): bigint;
37
+ export declare function wint64(_this: any, value: number, unsigned?: boolean, endian?: string): void;
38
+ export declare function wdfloat(_this: any, value: number, endian?: string): void;
39
+ export declare function rdfloat(_this: any, endian?: string): number;
40
+ export declare function rstring(_this: any, options?: {
41
+ length?: number;
42
+ stringType?: string;
43
+ terminateValue?: number;
44
+ lengthReadSize?: number;
45
+ stripNull?: boolean;
46
+ encoding?: string;
47
+ endian?: string;
48
+ }): string;
49
+ export declare function wstring(_this: any, string: string, options?: {
50
+ length?: number;
51
+ stringType?: string;
52
+ terminateValue?: number;
53
+ lengthWriteSize?: number;
54
+ stripNull?: boolean;
55
+ encoding?: string;
56
+ endian?: string;
57
+ }): void;
58
+ /**
59
+ * Binary reader, includes bitfields and strings
60
+ *
61
+ * @param {Buffer|Uint8Array} data - ```Buffer``` or ```Uint8Array```. Always found in ``biwriter.data``
62
+ * @param {number} byteOffset - Byte offset to start reader (default 0)
63
+ * @param {number} bitOffset - Bit offset 0-7 to start reader (default 0)
64
+ * @param {string} endianness - Endianness ```big``` or ```little``` (default ```little```)
65
+ * @param {boolean} strict - Strict mode: if true does not extend supplied array on outside write (default true)
66
+ */
67
+ export declare class bireader {
68
+ endian: string;
69
+ offset: number;
70
+ bitoffset: number;
71
+ size: number;
72
+ strict: boolean;
73
+ errorDump: boolean;
74
+ data: any;
75
+ private isBufferOrUint8Array;
76
+ extendArray(to_padd: number): void;
77
+ /**
78
+ * Binary reader, includes bitfields and strings
79
+ *
80
+ * @param {Buffer|Uint8Array} data - ```Buffer``` or ```Uint8Array```. Always found in ``biwriter.data``
81
+ * @param {number} byteOffset - Byte offset to start reader (default 0)
82
+ * @param {number} bitOffset - Bit offset 0-7 to start reader (default 0)
83
+ * @param {string} endianness - Endianness ```big``` or ```little``` (default ```little```)
84
+ * @param {boolean} strict - Strict mode: if true does not extend supplied array on outside write (default true)
85
+ */
86
+ constructor(data: Array<Buffer | Uint8Array>, byteOffset?: number, bitOffset?: number, endianness?: string, strict?: boolean);
87
+ /**
88
+ *
89
+ * Change endian, defaults to little
90
+ *
91
+ * Can be changed at any time, doesn't loose position
92
+ *
93
+ * @param {string} endian - endianness ```big``` or ```little```
94
+ */
95
+ endianness(endian: string): void;
96
+ /**
97
+ *Sets endian to big
98
+ */
99
+ bigEndian(): void;
100
+ /**
101
+ *Sets endian to big
102
+ */
103
+ big(): void;
104
+ /**
105
+ *Sets endian to big
106
+ */
107
+ be(): void;
108
+ /**
109
+ * Sets endian to little
110
+ */
111
+ littleEndian(): void;
112
+ /**
113
+ * Sets endian to little
114
+ */
115
+ little(): void;
116
+ /**
117
+ * Sets endian to little
118
+ */
119
+ le(): void;
120
+ /**
121
+ * Offset current byte or bit position
122
+ * Note: Will extend array if strict mode is off and outside of max size
123
+ *
124
+ * @param {number} bytes - Bytes to skip
125
+ * @param {number} bits - Bits to skip (0-7)
126
+ */
127
+ skip(bytes: number, bits?: number): void;
128
+ /**
129
+ * Offset current byte or bit position
130
+ * Note: Will extend array if strict mode is off and outside of max size
131
+ *
132
+ * @param {number} bytes - Bytes to skip
133
+ * @param {number} bits - Bits to skip (0-7)
134
+ */
135
+ jump(bytes: number, bits?: number): void;
136
+ /**
137
+ * Change position directly to address
138
+ * Note: Will extend array if strict mode is off and outside of max size
139
+ *
140
+ * @param {number} byte - byte to set to
141
+ * @param {number} bit - bit to set to (0-7)
142
+ */
143
+ goto(byte: number, bit?: number): void;
144
+ /**
145
+ * Offset current byte or bit position
146
+ * Note: Will extend array if strict mode is off and outside of max size
147
+ *
148
+ * @param {number} bytes - Bytes to skip
149
+ * @param {number} bits - Bits to skip (0-7)
150
+ */
151
+ seek(bytes: number, bits?: number): void;
152
+ /**
153
+ * Change position directly to address
154
+ * Note: Will extend array if strict mode is off and outside of max size
155
+ *
156
+ * @param {number} byte - byte to set to
157
+ * @param {number} bit - bit to set to (0-7)
158
+ */
159
+ pointer(byte: number, bit?: number): void;
160
+ /**
161
+ * Change position directly to address
162
+ * Note: Will extend array if strict mode is off and outside of max size
163
+ *
164
+ * @param {number} byte - byte to set to
165
+ * @param {number} bit - bit to set to (0-7)
166
+ */
167
+ warp(byte: number, bit?: number): void;
168
+ /**
169
+ * Set byte and bit position to start of data
170
+ */
171
+ rewind(): void;
172
+ /**
173
+ * Set byte and bit position to start of data
174
+ */
175
+ gotostart(): void;
176
+ /**
177
+ * Get the current byte position
178
+ *
179
+ * @return {number} current byte position
180
+ */
181
+ tell(): number;
182
+ /**
183
+ * Get the current byte position
184
+ *
185
+ * @return {number} current byte position
186
+ */
187
+ getOffset(): number;
188
+ /**
189
+ * Get the current byte position
190
+ *
191
+ * @return {number} current byte position
192
+ */
193
+ saveOffset(): number;
194
+ /**
195
+ * Get the current bit position (0-7)
196
+ *
197
+ * @return {number} current bit position
198
+ */
199
+ tellB(): number;
200
+ /**
201
+ * Get the current bit position (0-7)
202
+ *
203
+ * @return {number} current bit position
204
+ */
205
+ getOffsetBit(): number;
206
+ /**
207
+ * Get the current bit position (0-7)
208
+ *
209
+ * @return {number} current bit position
210
+ */
211
+ saveOffsetAbsBit(): number;
212
+ /**
213
+ * Get the current absolute bit position (from start of data)
214
+ *
215
+ * @return {number} current absolute bit position
216
+ */
217
+ tellAbsB(): number;
218
+ /**
219
+ * Get the current absolute bit position (from start of data)
220
+ *
221
+ * @return {number} current absolute bit position
222
+ */
223
+ getOffsetAbsBit(): number;
224
+ /**
225
+ * Get the current absolute bit position (from start of data)
226
+ *
227
+ * @return {number} current absolute bit position
228
+ */
229
+ saveOffsetBit(): number;
230
+ /**
231
+ * Disallows extending data if position is outside of max size
232
+ */
233
+ restrict(): void;
234
+ /**
235
+ * Allows extending data if position is outside of max size
236
+ */
237
+ unrestrict(): void;
238
+ /**
239
+ * XOR data
240
+ *
241
+ * @param {number|string|Uint8Array|Buffer} xorKey - Value, string or array to XOR
242
+ * @param {number} startOffset - Start location (default current byte position)
243
+ * @param {number} endOffset - End location (default end of data)
244
+ * @param {boolean} consume - Move current position to end of data (default false)
245
+ */
246
+ xor(xorKey: number | string | Uint8Array | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
247
+ /**
248
+ * XOR data
249
+ *
250
+ * @param {number|string|Uint8Array|Buffer} xorKey - Value, string or array to XOR
251
+ * @param {number} length - Length in bytes to XOR from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
252
+ * @param {boolean} consume - Move current position to end of data (default false)
253
+ */
254
+ xorThis(xorKey: number | string | Uint8Array | Buffer, length?: number, consume?: boolean): void;
255
+ /**
256
+ * OR data
257
+ *
258
+ * @param {number|string|Uint8Array|Buffer} orKey - Value, string or array to OR
259
+ * @param {number} startOffset - Start location (default current byte position)
260
+ * @param {number} endOffset - End location (default end of data)
261
+ * @param {boolean} consume - Move current position to end of data (default false)
262
+ */
263
+ or(orKey: number | string | Uint8Array | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
264
+ /**
265
+ * OR data
266
+ *
267
+ * @param {number|string|Uint8Array|Buffer} orKey - Value, string or array to OR
268
+ * @param {number} length - Length in bytes to OR from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
269
+ * @param {boolean} consume - Move current position to end of data (default false)
270
+ */
271
+ orThis(orKey: number | string | Uint8Array | Buffer, length?: number, consume?: boolean): void;
272
+ /**
273
+ * AND data
274
+ *
275
+ * @param {number|string|Array<number>|Buffer} andKey - Value, string or array to AND
276
+ * @param {number} startOffset - Start location (default current byte position)
277
+ * @param {number} endOffset - End location (default end of data)
278
+ * @param {boolean} consume - Move current position to end of data (default false)
279
+ */
280
+ and(andKey: number | string | Array<number> | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
281
+ /**
282
+ * AND data
283
+ *
284
+ * @param {number|string|Array<number>|Buffer} andKey - Value, string or array to AND
285
+ * @param {number} length - Length in bytes to AND from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
286
+ * @param {boolean} consume - Move current position to end of data (default false)
287
+ */
288
+ andThis(andKey: number | string | Array<number> | Buffer, length?: number, consume?: boolean): void;
289
+ /**
290
+ * Not data
291
+ *
292
+ * @param {number} startOffset - Start location (default current byte position)
293
+ * @param {number} endOffset - End location (default end of data)
294
+ * @param {boolean} consume - Move current position to end of data (default false)
295
+ */
296
+ not(startOffset?: number, endOffset?: number, consume?: boolean): void;
297
+ /**
298
+ * Not data
299
+ *
300
+ * @param {number} length - Length in bytes to NOT from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
301
+ * @param {boolean} consume - Move current position to end of data (default false)
302
+ */
303
+ notThis(length?: number, consume?: boolean): void;
304
+ /**
305
+ * Left shift data
306
+ *
307
+ * @param {number|string|Array<number>|Buffer} shiftKey - Value, string or array to left shift data
308
+ * @param {number} startOffset - Start location (default current byte position)
309
+ * @param {number} endOffset - End location (default end of data)
310
+ * @param {boolean} consume - Move current position to end of data (default false)
311
+ */
312
+ lShift(shiftKey: number | string | Array<number> | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
313
+ /**
314
+ * Left shift data
315
+ *
316
+ * @param {number|string|Array<number>|Buffer} shiftKey - Value, string or array to left shift data
317
+ * @param {number} length - Length in bytes to left shift from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
318
+ * @param {boolean} consume - Move current position to end of data (default false)
319
+ */
320
+ lShiftThis(shiftKey: number | string | Array<number> | Buffer, length?: number, consume?: boolean): void;
321
+ /**
322
+ * Right shift data
323
+ *
324
+ * @param {number|string|Array<number>|Buffer} shiftKey - Value, string or array to right shift data
325
+ * @param {number} startOffset - Start location (default current byte position)
326
+ * @param {number} endOffset - End location (default end of data)
327
+ * @param {boolean} consume - Move current position to end of data (default false)
328
+ */
329
+ rShift(shiftKey: number | string | Array<number> | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
330
+ /**
331
+ * Right shift data
332
+ *
333
+ * @param {number|string|Array<number>|Buffer} shiftKey - Value, string or array to right shift data
334
+ * @param {number} length - Length in bytes to right shift from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
335
+ * @param {boolean} consume - Move current position to end of data (default false)
336
+ */
337
+ rShiftThis(shiftKey: number | string | Array<number> | Buffer, length?: number, consume?: boolean): void;
338
+ /**
339
+ * Add value to data
340
+ *
341
+ * @param {number|string|Array<number>|Buffer} addKey - Value, string or array to add to data
342
+ * @param {number} startOffset - Start location (default current byte position)
343
+ * @param {number} endOffset - End location (default end of data)
344
+ * @param {boolean} consume - Move current position to end of data (default false)
345
+ */
346
+ add(addKey: number | string | Array<number> | Buffer, startOffset?: number, endOffset?: number, consume?: boolean): void;
347
+ /**
348
+ * Add value to data
349
+ *
350
+ * @param {number|string|Array<number>|Buffer} addKey - Value, string or array to add to data
351
+ * @param {number} length - Length in bytes to add from curent position (default 1 byte for value, length of string or array for Uint8Array or Buffer)
352
+ * @param {boolean} consume - Move current position to end of data (default false)
353
+ */
354
+ addThis(addKey: number | string | Array<number> | Buffer, length?: number, consume?: boolean): void;
355
+ /**
356
+ * Deletes part of data from start to current byte position unless supplied, returns removed
357
+ * Note: Errors in strict mode
358
+ *
359
+ * @param {number} startOffset - Start location (default 0)
360
+ * @param {number} endOffset - End location (default current position)
361
+ * @param {boolean} consume - Move position to end of removed data (default false)
362
+ * @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
363
+ */
364
+ delete(startOffset?: number, endOffset?: number, consume?: boolean): Array<Buffer | Uint8Array>;
365
+ /**
366
+ * Deletes part of data from current byte position to end, returns removed
367
+ * Note: Errors in strict mode
368
+ *
369
+ * @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
370
+ */
371
+ clip(): Array<Buffer | Uint8Array>;
372
+ /**
373
+ * Deletes part of data from current byte position to end, returns removed
374
+ * Note: Errors in strict mode
375
+ *
376
+ * @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
377
+ */
378
+ trim(): Array<Buffer | Uint8Array>;
379
+ /**
380
+ * Deletes part of data from current byte position to supplied length, returns removed
381
+ * Note: Errors in strict mode
382
+ *
383
+ * @param {number} length - Length of data in bytes to remove
384
+ * @param {boolean} consume - Move position to end of removed data (default false)
385
+ * @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
386
+ */
387
+ crop(length: number, consume?: boolean): Array<Buffer | Uint8Array>;
388
+ /**
389
+ * Deletes part of data from current position to supplied length, returns removed
390
+ * Note: Only works in strict mode
391
+ *
392
+ * @param {number} length - Length of data in bytes to remove
393
+ * @param {boolean} consume - Move position to end of removed data (default false)
394
+ * @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
395
+ */
396
+ drop(length: number, consume?: boolean): Array<Buffer | Uint8Array>;
397
+ /**
398
+ * Returns part of data from current byte position to end of data unless supplied
399
+ *
400
+ * @param {number} startOffset - Start location (default current position)
401
+ * @param {number} endOffset - End location (default end of data)
402
+ * @param {boolean} consume - Move position to end of lifted data (default false)
403
+ * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
404
+ * @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
405
+ */
406
+ lift(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Array<Buffer | Uint8Array>;
407
+ /**
408
+ * Returns part of data from current byte position to end of data unless supplied
409
+ *
410
+ * @param {number} startOffset - Start location (default current position)
411
+ * @param {number} endOffset - End location (default end of data)
412
+ * @param {boolean} consume - Move position to end of lifted data (default false)
413
+ * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
414
+ * @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
415
+ */
416
+ fill(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Array<Buffer | Uint8Array>;
417
+ /**
418
+ * Extract data from current position to length supplied
419
+ * Note: Does not affect supplied data
420
+ *
421
+ * @param {number} length - Length of data in bytes to copy from current offset
422
+ * @param {number} consume - Moves offset to end of length
423
+ * @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
424
+ */
425
+ extract(length: number, consume?: boolean): Array<Buffer | Uint8Array>;
426
+ /**
427
+ * Extract data from current position to length supplied
428
+ * Note: Does not affect supplied data
429
+ *
430
+ * @param {number} length - Length of data in bytes to copy from current offset
431
+ * @param {number} consume - Moves offset to end of length
432
+ * @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
433
+ */
434
+ slice(length: number, consume?: boolean): Array<Buffer | Uint8Array>;
435
+ /**
436
+ * Extract data from current position to length supplied
437
+ * Note: Does not affect supplied data
438
+ *
439
+ * @param {number} length - Length of data in bytes to copy from current offset
440
+ * @param {number} consume - Moves offset to end of length
441
+ * @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
442
+ */
443
+ wrap(length: number, consume?: boolean): Array<Buffer | Uint8Array>;
444
+ /**
445
+ * Inserts data into data
446
+ * Note: Must be same data type as supplied data. Errors on strict mode.
447
+ *
448
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
449
+ * @param {boolean} consume - Move current byte position to end of data (default false)
450
+ * @param {number} offset - Byte position to add at (defaults to current position)
451
+ */
452
+ insert(data: Buffer | Uint8Array, consume?: boolean, offset?: number): void;
453
+ /**
454
+ * Inserts data into data
455
+ * Note: Must be same data type as supplied data. Errors on strict mode.
456
+ *
457
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
458
+ * @param {boolean} consume - Move current byte position to end of data (default false)
459
+ * @param {number} offset - Byte position to add at (defaults to current position)
460
+ */
461
+ place(data: Buffer | Uint8Array, consume?: boolean, offset?: number): void;
462
+ /**
463
+ * Replaces data in data
464
+ * Note: Must be same data type as supplied data. Errors on strict mode.
465
+ *
466
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to replace in data
467
+ * @param {boolean} consume - Move current byte position to end of data (default false)
468
+ * @param {number} offset - Offset to add it at (defaults to current position)
469
+ */
470
+ replace(data: Buffer | Uint8Array, consume?: boolean, offset?: number): void;
471
+ /**
472
+ * Replaces data in data
473
+ * Note: Must be same data type as supplied data. Errors on strict mode.
474
+ *
475
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to replace in data
476
+ * @param {boolean} consume - Move current byte position to end of data (default false)
477
+ * @param {number} offset - Offset to add it at (defaults to current position)
478
+ */
479
+ overwrite(data: Buffer | Uint8Array, consume?: boolean, offset?: number): void;
480
+ /**
481
+ * Adds data to start of supplied data
482
+ * Note: Must be same data type as supplied data. Errors on strict mode.
483
+ *
484
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
485
+ * @param {boolean} consume - Move current write position to end of data (default false)
486
+ */
487
+ unshift(data: Buffer | Uint8Array, consume?: boolean): void;
488
+ /**
489
+ * Adds data to start of supplied data
490
+ * Note: Must be same data type as supplied data. Errors on strict mode.
491
+ *
492
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
493
+ * @param {boolean} consume - Move current write position to end of data (default false)
494
+ */
495
+ prepend(data: Buffer | Uint8Array, consume?: boolean): void;
496
+ /**
497
+ * Adds data to end of supplied data
498
+ * Note: Must be same data type as supplied data. Errors on strict mode.
499
+ *
500
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
501
+ * @param {boolean} consume - Move current write position to end of data (default false)
502
+ */
503
+ push(data: Buffer | Uint8Array, consume?: boolean): void;
504
+ /**
505
+ * Adds data to end of supplied data
506
+ * Note: Must be same data type as supplied data. Errors on strict mode.
507
+ *
508
+ * @param {Buffer|Uint8Array} data - ```Uint8Array``` or ```Buffer``` to add to data
509
+ * @param {boolean} consume - Move current write position to end of data (default false)
510
+ */
511
+ append(data: Buffer | Uint8Array, consume?: boolean): void;
512
+ /**
513
+ * Returns current data
514
+ *
515
+ * @returns {Buffer|Uint8Array} ``Buffer`` or ``Uint8Array``
516
+ */
517
+ get(): Array<Buffer | Uint8Array>;
518
+ /**
519
+ * Returns current data
520
+ *
521
+ * @returns {Buffer|Uint8Array} ``Buffer`` or ``Uint8Array``
522
+ */
523
+ return(): Array<Buffer | Uint8Array>;
524
+ /**
525
+ * removes data
526
+ */
527
+ end(): void;
528
+ /**
529
+ * removes data
530
+ */
531
+ close(): void;
532
+ /**
533
+ * removes data
534
+ */
535
+ done(): void;
536
+ /**
537
+ * removes data
538
+ */
539
+ finished(): void;
540
+ /**
541
+ * Console logs data as hex dump
542
+ *
543
+ * @param {object} options
544
+ * ```javascript
545
+ * {
546
+ * length: 192, // number of bytes to log, default 192 or end of data
547
+ * startByte: 0, // byte to start dump (default current byte position)
548
+ * supressUnicode: false // Supress unicode character preview for even columns
549
+ * }
550
+ * ```
551
+ */
552
+ hexdump(options?: {
553
+ length?: number;
554
+ startByte?: number;
555
+ supressUnicode?: boolean;
556
+ }): void;
557
+ /**
558
+ * Turn hexdump on error off (default on)
559
+ */
560
+ errorDumpOff(): void;
561
+ /**
562
+ * Turn hexdump on error on (default on)
563
+ */
564
+ errorDumpOn(): void;
565
+ /**
566
+ *
567
+ * Write bits, must have at least value and number of bits
568
+ *
569
+ * ``Note``: When returning to a byte write, remaining bits are skipped
570
+ *
571
+ * @param {number} value - value as int
572
+ * @param {number} bits - number of bits to write
573
+ * @param {boolean} unsigned - if value is unsigned
574
+ * @param {string} endian - ``big`` or ``little``
575
+ */
576
+ writeBit(value: number, bits: number, unsigned?: boolean, endian?: string): void;
577
+ /**
578
+ * Bit field reader
579
+ *
580
+ * Note: When returning to a byte read, remaining bits are dropped
581
+ *
582
+ * @param {number} bits - bits to read
583
+ * @param {boolean} unsigned - if the value is unsigned
584
+ * @param {string} endian - ``big`` or ``little`
585
+ * @returns number
586
+ */
587
+ readBit(bits?: number, unsigned?: boolean, endian?: string): number;
588
+ /**
589
+ * Bit field reader
590
+ *
591
+ * Note: When returning to a byte read, remaining bits are dropped
592
+ *
593
+ * @param {number} bits - bits to read
594
+ * @param {boolean} unsigned - if the value is unsigned
595
+ * @param {string} endian - ``big`` or ``little`
596
+ * @returns number
597
+ */
598
+ bit(bits: number, unsigned?: boolean, endian?: string): number;
599
+ /**
600
+ * Bit field reader
601
+ *
602
+ * Note: When returning to a byte read, remaining bits are dropped
603
+ *
604
+ * @param {boolean} unsigned - if the value is unsigned
605
+ * @param {string} endian - ``big`` or ``little`
606
+ * @returns number
607
+ */
608
+ bit1(unsigned?: boolean, endian?: string): number;
609
+ /**
610
+ * Bit field reader
611
+ *
612
+ * Note: When returning to a byte read, remaining bits are dropped
613
+ *
614
+ * @param {boolean} unsigned - if the value is unsigned
615
+ * @returns number
616
+ */
617
+ bit1le(unsigned?: boolean): number;
618
+ /**
619
+ * Bit field reader
620
+ *
621
+ * Note: When returning to a byte read, remaining bits are dropped
622
+ *
623
+ * @param {boolean} unsigned - if the value is unsigned
624
+ * @returns number
625
+ */
626
+ bit1be(unsigned?: boolean): number;
627
+ /**
628
+ * Bit field reader
629
+ *
630
+ * Note: When returning to a byte read, remaining bits are dropped
631
+ *
632
+ * @returns number
633
+ */
634
+ ubit1(): number;
635
+ /**
636
+ * Bit field reader
637
+ *
638
+ * Note: When returning to a byte read, remaining bits are dropped
639
+ *
640
+ * @returns number
641
+ */
642
+ ubit1le(): number;
643
+ /**
644
+ * Bit field reader
645
+ *
646
+ * Note: When returning to a byte read, remaining bits are dropped
647
+ *
648
+ * @returns number
649
+ */
650
+ ubit1be(): number;
651
+ /**
652
+ * Bit field reader
653
+ *
654
+ * Note: When returning to a byte read, remaining bits are dropped
655
+ *
656
+ * @param {boolean} unsigned - if the value is unsigned
657
+ * @returns number
658
+ */
659
+ bit2(unsigned?: boolean): number;
660
+ /**
661
+ * Bit field reader
662
+ *
663
+ * Note: When returning to a byte read, remaining bits are dropped
664
+ *
665
+ * @param {boolean} unsigned - if the value is unsigned
666
+ * @returns number
667
+ */
668
+ bit2le(unsigned?: boolean): number;
669
+ /**
670
+ * Bit field reader
671
+ *
672
+ * Note: When returning to a byte read, remaining bits are dropped
673
+ *
674
+ * @param {boolean} unsigned - if the value is unsigned
675
+ * @returns number
676
+ */
677
+ bit2be(unsigned?: boolean): number;
678
+ /**
679
+ * Bit field reader
680
+ *
681
+ * Note: When returning to a byte read, remaining bits are dropped
682
+ *
683
+ * @returns number
684
+ */
685
+ ubit2(): number;
686
+ /**
687
+ * Bit field reader
688
+ *
689
+ * Note: When returning to a byte read, remaining bits are dropped
690
+ *
691
+ * @returns number
692
+ */
693
+ ubit2le(): number;
694
+ /**
695
+ * Bit field reader
696
+ *
697
+ * Note: When returning to a byte read, remaining bits are dropped
698
+ *
699
+ * @returns number
700
+ */
701
+ ubit2be(): number;
702
+ /**
703
+ * Bit field reader
704
+ *
705
+ * Note: When returning to a byte read, remaining bits are dropped
706
+ *
707
+ * @param {boolean} unsigned - if the value is unsigned
708
+ * @returns number
709
+ */
710
+ bit3(unsigned?: boolean): number;
711
+ /**
712
+ * Bit field reader
713
+ *
714
+ * Note: When returning to a byte read, remaining bits are dropped
715
+ *
716
+ * @param {boolean} unsigned - if the value is unsigned
717
+ * @returns number
718
+ */
719
+ bit3le(unsigned?: boolean): number;
720
+ /**
721
+ * Bit field reader
722
+ *
723
+ * Note: When returning to a byte read, remaining bits are dropped
724
+ *
725
+ * @param {boolean} unsigned - if the value is unsigned
726
+ * @returns number
727
+ */
728
+ bit3be(unsigned?: boolean): number;
729
+ /**
730
+ * Bit field reader
731
+ *
732
+ * Note: When returning to a byte read, remaining bits are dropped
733
+ *
734
+ * @returns number
735
+ */
736
+ ubit3(): number;
737
+ /**
738
+ * Bit field reader
739
+ *
740
+ * Note: When returning to a byte read, remaining bits are dropped
741
+ *
742
+ * @returns number
743
+ */
744
+ ubit3le(): number;
745
+ /**
746
+ * Bit field reader
747
+ *
748
+ * Note: When returning to a byte read, remaining bits are dropped
749
+ *
750
+ * @returns number
751
+ */
752
+ ubit3be(): number;
753
+ /**
754
+ * Bit field reader
755
+ *
756
+ * Note: When returning to a byte read, remaining bits are dropped
757
+ *
758
+ * @param {boolean} unsigned - if the value is unsigned
759
+ * @returns number
760
+ */
761
+ bit4(unsigned?: boolean): number;
762
+ /**
763
+ * Bit field reader
764
+ *
765
+ * Note: When returning to a byte read, remaining bits are dropped
766
+ *
767
+ * @param {boolean} unsigned - if the value is unsigned
768
+ * @returns number
769
+ */
770
+ bit4le(unsigned?: boolean): number;
771
+ /**
772
+ * Bit field reader
773
+ *
774
+ * Note: When returning to a byte read, remaining bits are dropped
775
+ *
776
+ * @param {boolean} unsigned - if the value is unsigned
777
+ * @returns number
778
+ */
779
+ bit4be(unsigned?: boolean): number;
780
+ /**
781
+ * Bit field reader
782
+ *
783
+ * Note: When returning to a byte read, remaining bits are dropped
784
+ *
785
+ * @returns number
786
+ */
787
+ ubit4(): number;
788
+ /**
789
+ * Bit field reader
790
+ *
791
+ * Note: When returning to a byte read, remaining bits are dropped
792
+ *
793
+ * @returns number
794
+ */
795
+ ubit4le(): number;
796
+ /**
797
+ * Bit field reader
798
+ *
799
+ * Note: When returning to a byte read, remaining bits are dropped
800
+ *
801
+ * @returns number
802
+ */
803
+ ubit4be(): number;
804
+ /**
805
+ * Bit field reader
806
+ *
807
+ * Note: When returning to a byte read, remaining bits are dropped
808
+ *
809
+ * @param {boolean} unsigned - if the value is unsigned
810
+ * @returns number
811
+ */
812
+ bit5(unsigned?: boolean): number;
813
+ /**
814
+ * Bit field reader
815
+ *
816
+ * Note: When returning to a byte read, remaining bits are dropped
817
+ *
818
+ * @param {boolean} unsigned - if the value is unsigned
819
+ * @returns number
820
+ */
821
+ bit5le(unsigned?: boolean): number;
822
+ /**
823
+ * Bit field reader
824
+ *
825
+ * Note: When returning to a byte read, remaining bits are dropped
826
+ *
827
+ * @param {boolean} unsigned - if the value is unsigned
828
+ * @returns number
829
+ */
830
+ bit5be(unsigned?: boolean): number;
831
+ /**
832
+ * Bit field reader
833
+ *
834
+ * Note: When returning to a byte read, remaining bits are dropped
835
+ *
836
+ * @returns number
837
+ */
838
+ ubit5(): number;
839
+ /**
840
+ * Bit field reader
841
+ *
842
+ * Note: When returning to a byte read, remaining bits are dropped
843
+ *
844
+ * @returns number
845
+ */
846
+ ubit5le(): number;
847
+ /**
848
+ * Bit field reader
849
+ *
850
+ * Note: When returning to a byte read, remaining bits are dropped
851
+ *
852
+ * @returns number
853
+ */
854
+ ubit5be(): number;
855
+ /**
856
+ * Bit field reader
857
+ *
858
+ * Note: When returning to a byte read, remaining bits are dropped
859
+ *
860
+ * @param {boolean} unsigned - if the value is unsigned
861
+ * @returns number
862
+ */
863
+ bit6(unsigned?: boolean): number;
864
+ /**
865
+ * Bit field reader
866
+ *
867
+ * Note: When returning to a byte read, remaining bits are dropped
868
+ *
869
+ * @param {boolean} unsigned - if the value is unsigned
870
+ * @returns number
871
+ */
872
+ bit6le(unsigned?: boolean): number;
873
+ /**
874
+ * Bit field reader
875
+ *
876
+ * Note: When returning to a byte read, remaining bits are dropped
877
+ *
878
+ * @param {boolean} unsigned - if the value is unsigned
879
+ * @returns number
880
+ */
881
+ bit6be(unsigned?: boolean): number;
882
+ /**
883
+ * Bit field reader
884
+ *
885
+ * Note: When returning to a byte read, remaining bits are dropped
886
+ *
887
+ * @returns number
888
+ */
889
+ ubit6(): number;
890
+ /**
891
+ * Bit field reader
892
+ *
893
+ * Note: When returning to a byte read, remaining bits are dropped
894
+ *
895
+ * @returns number
896
+ */
897
+ ubit6le(): number;
898
+ /**
899
+ * Bit field reader
900
+ *
901
+ * Note: When returning to a byte read, remaining bits are dropped
902
+ *
903
+ * @returns number
904
+ */
905
+ ubit6be(): number;
906
+ /**
907
+ * Bit field reader
908
+ *
909
+ * Note: When returning to a byte read, remaining bits are dropped
910
+ *
911
+ * @param {boolean} unsigned - if the value is unsigned
912
+ * @returns number
913
+ */
914
+ bit7(unsigned?: boolean): number;
915
+ /**
916
+ * Bit field reader
917
+ *
918
+ * Note: When returning to a byte read, remaining bits are dropped
919
+ *
920
+ * @param {boolean} unsigned - if the value is unsigned
921
+ * @returns number
922
+ */
923
+ bit7le(unsigned?: boolean): number;
924
+ /**
925
+ * Bit field reader
926
+ *
927
+ * Note: When returning to a byte read, remaining bits are dropped
928
+ *
929
+ * @param {boolean} unsigned - if the value is unsigned
930
+ * @returns number
931
+ */
932
+ bit7be(unsigned?: boolean): number;
933
+ /**
934
+ * Bit field reader
935
+ *
936
+ * Note: When returning to a byte read, remaining bits are dropped
937
+ *
938
+ * @returns number
939
+ */
940
+ ubit7(): number;
941
+ /**
942
+ * Bit field reader
943
+ *
944
+ * Note: When returning to a byte read, remaining bits are dropped
945
+ *
946
+ * @returns number
947
+ */
948
+ ubit7le(): number;
949
+ /**
950
+ * Bit field reader
951
+ *
952
+ * Note: When returning to a byte read, remaining bits are dropped
953
+ *
954
+ * @returns number
955
+ */
956
+ ubit7be(): number;
957
+ /**
958
+ * Bit field reader
959
+ *
960
+ * Note: When returning to a byte read, remaining bits are dropped
961
+ *
962
+ * @param {boolean} unsigned - if the value is unsigned
963
+ * @returns number
964
+ */
965
+ bit8(unsigned?: boolean): number;
966
+ /**
967
+ * Bit field reader
968
+ *
969
+ * Note: When returning to a byte read, remaining bits are dropped
970
+ *
971
+ * @param {boolean} unsigned - if the value is unsigned
972
+ * @returns number
973
+ */
974
+ bit8le(unsigned?: boolean): number;
975
+ /**
976
+ * Bit field reader
977
+ *
978
+ * Note: When returning to a byte read, remaining bits are dropped
979
+ *
980
+ * @param {boolean} unsigned - if the value is unsigned
981
+ * @returns number
982
+ */
983
+ bit8be(unsigned?: boolean): number;
984
+ /**
985
+ * Bit field reader
986
+ *
987
+ * Note: When returning to a byte read, remaining bits are dropped
988
+ *
989
+ * @returns number
990
+ */
991
+ ubit8(): number;
992
+ /**
993
+ * Bit field reader
994
+ *
995
+ * Note: When returning to a byte read, remaining bits are dropped
996
+ *
997
+ * @returns number
998
+ */
999
+ ubit8le(): number;
1000
+ /**
1001
+ * Bit field reader
1002
+ *
1003
+ * Note: When returning to a byte read, remaining bits are dropped
1004
+ *
1005
+ * @returns number
1006
+ */
1007
+ ubit8be(): number;
1008
+ /**
1009
+ * Bit field reader
1010
+ *
1011
+ * Note: When returning to a byte read, remaining bits are dropped
1012
+ *
1013
+ * @param {boolean} unsigned - if the value is unsigned
1014
+ * @returns number
1015
+ */
1016
+ bit9(unsigned?: boolean): number;
1017
+ /**
1018
+ * Bit field reader
1019
+ *
1020
+ * Note: When returning to a byte read, remaining bits are dropped
1021
+ *
1022
+ * @param {boolean} unsigned - if the value is unsigned
1023
+ * @returns number
1024
+ */
1025
+ bit9le(unsigned?: boolean): number;
1026
+ /**
1027
+ * Bit field reader
1028
+ *
1029
+ * Note: When returning to a byte read, remaining bits are dropped
1030
+ *
1031
+ * @param {boolean} unsigned - if the value is unsigned
1032
+ * @returns number
1033
+ */
1034
+ bit9be(unsigned?: boolean): number;
1035
+ /**
1036
+ * Bit field reader
1037
+ *
1038
+ * Note: When returning to a byte read, remaining bits are dropped
1039
+ *
1040
+ * @returns number
1041
+ */
1042
+ ubit9(): number;
1043
+ /**
1044
+ * Bit field reader
1045
+ *
1046
+ * Note: When returning to a byte read, remaining bits are dropped
1047
+ *
1048
+ * @returns number
1049
+ */
1050
+ ubit9le(): number;
1051
+ /**
1052
+ * Bit field reader
1053
+ *
1054
+ * Note: When returning to a byte read, remaining bits are dropped
1055
+ *
1056
+ * @returns number
1057
+ */
1058
+ ubit9be(): number;
1059
+ /**
1060
+ * Bit field reader
1061
+ *
1062
+ * Note: When returning to a byte read, remaining bits are dropped
1063
+ *
1064
+ * @param {boolean} unsigned - if the value is unsigned
1065
+ * @returns number
1066
+ */
1067
+ bit10(unsigned?: boolean): number;
1068
+ /**
1069
+ * Bit field reader
1070
+ *
1071
+ * Note: When returning to a byte read, remaining bits are dropped
1072
+ *
1073
+ * @param {boolean} unsigned - if the value is unsigned
1074
+ * @returns number
1075
+ */
1076
+ bit10le(unsigned?: boolean): number;
1077
+ /**
1078
+ * Bit field reader
1079
+ *
1080
+ * Note: When returning to a byte read, remaining bits are dropped
1081
+ *
1082
+ * @param {boolean} unsigned - if the value is unsigned
1083
+ * @returns number
1084
+ */
1085
+ bit10be(unsigned?: boolean): number;
1086
+ /**
1087
+ * Bit field reader
1088
+ *
1089
+ * Note: When returning to a byte read, remaining bits are dropped
1090
+ *
1091
+ * @returns number
1092
+ */
1093
+ ubit10(): number;
1094
+ /**
1095
+ * Bit field reader
1096
+ *
1097
+ * Note: When returning to a byte read, remaining bits are dropped
1098
+ *
1099
+ * @returns number
1100
+ */
1101
+ ubit10le(): number;
1102
+ /**
1103
+ * Bit field reader
1104
+ *
1105
+ * Note: When returning to a byte read, remaining bits are dropped
1106
+ *
1107
+ * @returns number
1108
+ */
1109
+ ubit10be(): number;
1110
+ /**
1111
+ * Bit field reader
1112
+ *
1113
+ * Note: When returning to a byte read, remaining bits are dropped
1114
+ *
1115
+ * @param {boolean} unsigned - if the value is unsigned
1116
+ * @returns number
1117
+ */
1118
+ bit11(unsigned?: boolean): number;
1119
+ /**
1120
+ * Bit field reader
1121
+ *
1122
+ * Note: When returning to a byte read, remaining bits are dropped
1123
+ *
1124
+ * @param {boolean} unsigned - if the value is unsigned
1125
+ * @returns number
1126
+ */
1127
+ bit11le(unsigned?: boolean): number;
1128
+ /**
1129
+ * Bit field reader
1130
+ *
1131
+ * Note: When returning to a byte read, remaining bits are dropped
1132
+ *
1133
+ * @param {boolean} unsigned - if the value is unsigned
1134
+ * @returns number
1135
+ */
1136
+ bit11be(unsigned?: boolean): number;
1137
+ /**
1138
+ * Bit field reader
1139
+ *
1140
+ * Note: When returning to a byte read, remaining bits are dropped
1141
+ *
1142
+ * @returns number
1143
+ */
1144
+ ubit11(): number;
1145
+ /**
1146
+ * Bit field reader
1147
+ *
1148
+ * Note: When returning to a byte read, remaining bits are dropped
1149
+ *
1150
+ * @returns number
1151
+ */
1152
+ ubit11le(): number;
1153
+ /**
1154
+ * Bit field reader
1155
+ *
1156
+ * Note: When returning to a byte read, remaining bits are dropped
1157
+ *
1158
+ * @returns number
1159
+ */
1160
+ ubit11be(): number;
1161
+ /**
1162
+ * Bit field reader
1163
+ *
1164
+ * Note: When returning to a byte read, remaining bits are dropped
1165
+ *
1166
+ * @param {boolean} unsigned - if the value is unsigned
1167
+ * @returns number
1168
+ */
1169
+ bit12(unsigned?: boolean): number;
1170
+ /**
1171
+ * Bit field reader
1172
+ *
1173
+ * Note: When returning to a byte read, remaining bits are dropped
1174
+ *
1175
+ * @param {boolean} unsigned - if the value is unsigned
1176
+ * @returns number
1177
+ */
1178
+ bit12le(unsigned?: boolean): number;
1179
+ /**
1180
+ * Bit field reader
1181
+ *
1182
+ * Note: When returning to a byte read, remaining bits are dropped
1183
+ *
1184
+ * @param {boolean} unsigned - if the value is unsigned
1185
+ * @returns number
1186
+ */
1187
+ bit12be(unsigned?: boolean): number;
1188
+ /**
1189
+ * Bit field reader
1190
+ *
1191
+ * Note: When returning to a byte read, remaining bits are dropped
1192
+ *
1193
+ * @returns number
1194
+ */
1195
+ ubit12(): number;
1196
+ /**
1197
+ * Bit field reader
1198
+ *
1199
+ * Note: When returning to a byte read, remaining bits are dropped
1200
+ *
1201
+ * @returns number
1202
+ */
1203
+ ubit12le(): number;
1204
+ /**
1205
+ * Bit field reader
1206
+ *
1207
+ * Note: When returning to a byte read, remaining bits are dropped
1208
+ *
1209
+ * @returns number
1210
+ */
1211
+ ubit12be(): number;
1212
+ /**
1213
+ * Bit field reader
1214
+ *
1215
+ * Note: When returning to a byte read, remaining bits are dropped
1216
+ *
1217
+ * @param {boolean} unsigned - if the value is unsigned
1218
+ * @returns number
1219
+ */
1220
+ bit13(unsigned?: boolean): number;
1221
+ /**
1222
+ * Bit field reader
1223
+ *
1224
+ * Note: When returning to a byte read, remaining bits are dropped
1225
+ *
1226
+ * @param {boolean} unsigned - if the value is unsigned
1227
+ * @returns number
1228
+ */
1229
+ bit13le(unsigned?: boolean): number;
1230
+ /**
1231
+ * Bit field reader
1232
+ *
1233
+ * Note: When returning to a byte read, remaining bits are dropped
1234
+ *
1235
+ * @param {boolean} unsigned - if the value is unsigned
1236
+ * @returns number
1237
+ */
1238
+ bit13be(unsigned?: boolean): number;
1239
+ /**
1240
+ * Bit field reader
1241
+ *
1242
+ * Note: When returning to a byte read, remaining bits are dropped
1243
+ *
1244
+ * @returns number
1245
+ */
1246
+ ubit13(): number;
1247
+ /**
1248
+ * Bit field reader
1249
+ *
1250
+ * Note: When returning to a byte read, remaining bits are dropped
1251
+ *
1252
+ * @returns number
1253
+ */
1254
+ ubit13le(): number;
1255
+ /**
1256
+ * Bit field reader
1257
+ *
1258
+ * Note: When returning to a byte read, remaining bits are dropped
1259
+ *
1260
+ * @returns number
1261
+ */
1262
+ ubit13be(): number;
1263
+ /**
1264
+ * Bit field reader
1265
+ *
1266
+ * Note: When returning to a byte read, remaining bits are dropped
1267
+ *
1268
+ * @param {boolean} unsigned - if the value is unsigned
1269
+ * @returns number
1270
+ */
1271
+ bit14(unsigned?: boolean): number;
1272
+ /**
1273
+ * Bit field reader
1274
+ *
1275
+ * Note: When returning to a byte read, remaining bits are dropped
1276
+ *
1277
+ * @param {boolean} unsigned - if the value is unsigned
1278
+ * @returns number
1279
+ */
1280
+ bit14le(unsigned?: boolean): number;
1281
+ /**
1282
+ * Bit field reader
1283
+ *
1284
+ * Note: When returning to a byte read, remaining bits are dropped
1285
+ *
1286
+ * @param {boolean} unsigned - if the value is unsigned
1287
+ * @returns number
1288
+ */
1289
+ bit14be(unsigned?: boolean): number;
1290
+ /**
1291
+ * Bit field reader
1292
+ *
1293
+ * Note: When returning to a byte read, remaining bits are dropped
1294
+ *
1295
+ * @returns number
1296
+ */
1297
+ ubit14(): number;
1298
+ /**
1299
+ * Bit field reader
1300
+ *
1301
+ * Note: When returning to a byte read, remaining bits are dropped
1302
+ *
1303
+ * @returns number
1304
+ */
1305
+ ubit14le(): number;
1306
+ /**
1307
+ * Bit field reader
1308
+ *
1309
+ * Note: When returning to a byte read, remaining bits are dropped
1310
+ *
1311
+ * @returns number
1312
+ */
1313
+ ubit14be(): number;
1314
+ /**
1315
+ * Bit field reader
1316
+ *
1317
+ * Note: When returning to a byte read, remaining bits are dropped
1318
+ *
1319
+ * @param {boolean} unsigned - if the value is unsigned
1320
+ * @returns number
1321
+ */
1322
+ bit15(unsigned?: boolean): number;
1323
+ /**
1324
+ * Bit field reader
1325
+ *
1326
+ * Note: When returning to a byte read, remaining bits are dropped
1327
+ *
1328
+ * @param {boolean} unsigned - if the value is unsigned
1329
+ * @returns number
1330
+ */
1331
+ bit15le(unsigned?: boolean): number;
1332
+ /**
1333
+ * Bit field reader
1334
+ *
1335
+ * Note: When returning to a byte read, remaining bits are dropped
1336
+ *
1337
+ * @param {boolean} unsigned - if the value is unsigned
1338
+ * @returns number
1339
+ */
1340
+ bit15be(unsigned?: boolean): number;
1341
+ /**
1342
+ * Bit field reader
1343
+ *
1344
+ * Note: When returning to a byte read, remaining bits are dropped
1345
+ *
1346
+ * @returns number
1347
+ */
1348
+ ubit15(): number;
1349
+ /**
1350
+ * Bit field reader
1351
+ *
1352
+ * Note: When returning to a byte read, remaining bits are dropped
1353
+ *
1354
+ * @returns number
1355
+ */
1356
+ ubit15le(): number;
1357
+ /**
1358
+ * Bit field reader
1359
+ *
1360
+ * Note: When returning to a byte read, remaining bits are dropped
1361
+ *
1362
+ * @returns number
1363
+ */
1364
+ ubit15be(): number;
1365
+ /**
1366
+ * Bit field reader
1367
+ *
1368
+ * Note: When returning to a byte read, remaining bits are dropped
1369
+ *
1370
+ * @param {boolean} unsigned - if the value is unsigned
1371
+ * @returns number
1372
+ */
1373
+ bit16(unsigned?: boolean): number;
1374
+ /**
1375
+ * Bit field reader
1376
+ *
1377
+ * Note: When returning to a byte read, remaining bits are dropped
1378
+ *
1379
+ * @param {boolean} unsigned - if the value is unsigned
1380
+ * @returns number
1381
+ */
1382
+ bit16le(unsigned?: boolean): number;
1383
+ /**
1384
+ * Bit field reader
1385
+ *
1386
+ * Note: When returning to a byte read, remaining bits are dropped
1387
+ *
1388
+ * @param {boolean} unsigned - if the value is unsigned
1389
+ * @returns number
1390
+ */
1391
+ bit16be(unsigned?: boolean): number;
1392
+ /**
1393
+ * Bit field reader
1394
+ *
1395
+ * Note: When returning to a byte read, remaining bits are dropped
1396
+ *
1397
+ * @returns number
1398
+ */
1399
+ ubit16(): number;
1400
+ /**
1401
+ * Bit field reader
1402
+ *
1403
+ * Note: When returning to a byte read, remaining bits are dropped
1404
+ *
1405
+ * @returns number
1406
+ */
1407
+ ubit16le(): number;
1408
+ /**
1409
+ * Bit field reader
1410
+ *
1411
+ * Note: When returning to a byte read, remaining bits are dropped
1412
+ *
1413
+ * @returns number
1414
+ */
1415
+ ubit16be(): number;
1416
+ /**
1417
+ * Bit field reader
1418
+ *
1419
+ * Note: When returning to a byte read, remaining bits are dropped
1420
+ *
1421
+ * @param {boolean} unsigned - if the value is unsigned
1422
+ * @returns number
1423
+ */
1424
+ bit17(unsigned?: boolean): number;
1425
+ /**
1426
+ * Bit field reader
1427
+ *
1428
+ * Note: When returning to a byte read, remaining bits are dropped
1429
+ *
1430
+ * @param {boolean} unsigned - if the value is unsigned
1431
+ * @returns number
1432
+ */
1433
+ bit17le(unsigned?: boolean): number;
1434
+ /**
1435
+ * Bit field reader
1436
+ *
1437
+ * Note: When returning to a byte read, remaining bits are dropped
1438
+ *
1439
+ * @param {boolean} unsigned - if the value is unsigned
1440
+ * @returns number
1441
+ */
1442
+ bit17be(unsigned?: boolean): number;
1443
+ /**
1444
+ * Bit field reader
1445
+ *
1446
+ * Note: When returning to a byte read, remaining bits are dropped
1447
+ *
1448
+ * @returns number
1449
+ */
1450
+ ubit17(): number;
1451
+ /**
1452
+ * Bit field reader
1453
+ *
1454
+ * Note: When returning to a byte read, remaining bits are dropped
1455
+ *
1456
+ * @returns number
1457
+ */
1458
+ ubit17le(): number;
1459
+ /**
1460
+ * Bit field reader
1461
+ *
1462
+ * Note: When returning to a byte read, remaining bits are dropped
1463
+ *
1464
+ * @returns number
1465
+ */
1466
+ ubit17be(): number;
1467
+ /**
1468
+ * Bit field reader
1469
+ *
1470
+ * Note: When returning to a byte read, remaining bits are dropped
1471
+ *
1472
+ * @param {boolean} unsigned - if the value is unsigned
1473
+ * @returns number
1474
+ */
1475
+ bit18(unsigned?: boolean): number;
1476
+ /**
1477
+ * Bit field reader
1478
+ *
1479
+ * Note: When returning to a byte read, remaining bits are dropped
1480
+ *
1481
+ * @param {boolean} unsigned - if the value is unsigned
1482
+ * @returns number
1483
+ */
1484
+ bit18le(unsigned?: boolean): number;
1485
+ /**
1486
+ * Bit field reader
1487
+ *
1488
+ * Note: When returning to a byte read, remaining bits are dropped
1489
+ *
1490
+ * @param {boolean} unsigned - if the value is unsigned
1491
+ * @returns number
1492
+ */
1493
+ bit18be(unsigned?: boolean): number;
1494
+ /**
1495
+ * Bit field reader
1496
+ *
1497
+ * Note: When returning to a byte read, remaining bits are dropped
1498
+ *
1499
+ * @returns number
1500
+ */
1501
+ ubit18(): number;
1502
+ /**
1503
+ * Bit field reader
1504
+ *
1505
+ * Note: When returning to a byte read, remaining bits are dropped
1506
+ *
1507
+ * @returns number
1508
+ */
1509
+ ubit18le(): number;
1510
+ /**
1511
+ * Bit field reader
1512
+ *
1513
+ * Note: When returning to a byte read, remaining bits are dropped
1514
+ *
1515
+ * @returns number
1516
+ */
1517
+ ubit18be(): number;
1518
+ /**
1519
+ * Bit field reader
1520
+ *
1521
+ * Note: When returning to a byte read, remaining bits are dropped
1522
+ *
1523
+ * @param {boolean} unsigned - if the value is unsigned
1524
+ * @returns number
1525
+ */
1526
+ bit19(unsigned?: boolean): number;
1527
+ /**
1528
+ * Bit field reader
1529
+ *
1530
+ * Note: When returning to a byte read, remaining bits are dropped
1531
+ *
1532
+ * @param {boolean} unsigned - if the value is unsigned
1533
+ * @returns number
1534
+ */
1535
+ bit19le(unsigned?: boolean): number;
1536
+ /**
1537
+ * Bit field reader
1538
+ *
1539
+ * Note: When returning to a byte read, remaining bits are dropped
1540
+ *
1541
+ * @param {boolean} unsigned - if the value is unsigned
1542
+ * @returns number
1543
+ */
1544
+ bit19be(unsigned?: boolean): number;
1545
+ /**
1546
+ * Bit field reader
1547
+ *
1548
+ * Note: When returning to a byte read, remaining bits are dropped
1549
+ *
1550
+ * @returns number
1551
+ */
1552
+ ubit19(): number;
1553
+ /**
1554
+ * Bit field reader
1555
+ *
1556
+ * Note: When returning to a byte read, remaining bits are dropped
1557
+ *
1558
+ * @returns number
1559
+ */
1560
+ ubit19le(): number;
1561
+ /**
1562
+ * Bit field reader
1563
+ *
1564
+ * Note: When returning to a byte read, remaining bits are dropped
1565
+ *
1566
+ * @returns number
1567
+ */
1568
+ ubit19be(): number;
1569
+ /**
1570
+ * Bit field reader
1571
+ *
1572
+ * Note: When returning to a byte read, remaining bits are dropped
1573
+ *
1574
+ * @param {boolean} unsigned - if the value is unsigned
1575
+ * @returns number
1576
+ */
1577
+ bit20(unsigned?: boolean): number;
1578
+ /**
1579
+ * Bit field reader
1580
+ *
1581
+ * Note: When returning to a byte read, remaining bits are dropped
1582
+ *
1583
+ * @param {boolean} unsigned - if the value is unsigned
1584
+ * @returns number
1585
+ */
1586
+ bit20le(unsigned?: boolean): number;
1587
+ /**
1588
+ * Bit field reader
1589
+ *
1590
+ * Note: When returning to a byte read, remaining bits are dropped
1591
+ *
1592
+ * @param {boolean} unsigned - if the value is unsigned
1593
+ * @returns number
1594
+ */
1595
+ bit20be(unsigned?: boolean): number;
1596
+ /**
1597
+ * Bit field reader
1598
+ *
1599
+ * Note: When returning to a byte read, remaining bits are dropped
1600
+ *
1601
+ * @returns number
1602
+ */
1603
+ ubit20(): number;
1604
+ /**
1605
+ * Bit field reader
1606
+ *
1607
+ * Note: When returning to a byte read, remaining bits are dropped
1608
+ *
1609
+ * @returns number
1610
+ */
1611
+ ubit20le(): number;
1612
+ /**
1613
+ * Bit field reader
1614
+ *
1615
+ * Note: When returning to a byte read, remaining bits are dropped
1616
+ *
1617
+ * @returns number
1618
+ */
1619
+ ubit20be(): number;
1620
+ /**
1621
+ * Bit field reader
1622
+ *
1623
+ * Note: When returning to a byte read, remaining bits are dropped
1624
+ *
1625
+ * @param {boolean} unsigned - if the value is unsigned
1626
+ * @returns number
1627
+ */
1628
+ bit21(unsigned?: boolean): number;
1629
+ /**
1630
+ * Bit field reader
1631
+ *
1632
+ * Note: When returning to a byte read, remaining bits are dropped
1633
+ *
1634
+ * @param {boolean} unsigned - if the value is unsigned
1635
+ * @returns number
1636
+ */
1637
+ bit21le(unsigned?: boolean): number;
1638
+ /**
1639
+ * Bit field reader
1640
+ *
1641
+ * Note: When returning to a byte read, remaining bits are dropped
1642
+ *
1643
+ * @param {boolean} unsigned - if the value is unsigned
1644
+ * @returns number
1645
+ */
1646
+ bit21be(unsigned?: boolean): number;
1647
+ /**
1648
+ * Bit field reader
1649
+ *
1650
+ * Note: When returning to a byte read, remaining bits are dropped
1651
+ *
1652
+ * @returns number
1653
+ */
1654
+ ubit21(): number;
1655
+ /**
1656
+ * Bit field reader
1657
+ *
1658
+ * Note: When returning to a byte read, remaining bits are dropped
1659
+ *
1660
+ * @returns number
1661
+ */
1662
+ ubit21le(): number;
1663
+ /**
1664
+ * Bit field reader
1665
+ *
1666
+ * Note: When returning to a byte read, remaining bits are dropped
1667
+ *
1668
+ * @returns number
1669
+ */
1670
+ ubit21be(): number;
1671
+ /**
1672
+ * Bit field reader
1673
+ *
1674
+ * Note: When returning to a byte read, remaining bits are dropped
1675
+ *
1676
+ * @param {boolean} unsigned - if the value is unsigned
1677
+ * @returns number
1678
+ */
1679
+ bit22(unsigned?: boolean): number;
1680
+ /**
1681
+ * Bit field reader
1682
+ *
1683
+ * Note: When returning to a byte read, remaining bits are dropped
1684
+ *
1685
+ * @param {boolean} unsigned - if the value is unsigned
1686
+ * @returns number
1687
+ */
1688
+ bit22le(unsigned?: boolean): number;
1689
+ /**
1690
+ * Bit field reader
1691
+ *
1692
+ * Note: When returning to a byte read, remaining bits are dropped
1693
+ *
1694
+ * @param {boolean} unsigned - if the value is unsigned
1695
+ * @returns number
1696
+ */
1697
+ bit22be(unsigned?: boolean): number;
1698
+ /**
1699
+ * Bit field reader
1700
+ *
1701
+ * Note: When returning to a byte read, remaining bits are dropped
1702
+ *
1703
+ * @returns number
1704
+ */
1705
+ ubit22(): number;
1706
+ /**
1707
+ * Bit field reader
1708
+ *
1709
+ * Note: When returning to a byte read, remaining bits are dropped
1710
+ *
1711
+ * @returns number
1712
+ */
1713
+ ubit22le(): number;
1714
+ /**
1715
+ * Bit field reader
1716
+ *
1717
+ * Note: When returning to a byte read, remaining bits are dropped
1718
+ *
1719
+ * @returns number
1720
+ */
1721
+ ubit22be(): number;
1722
+ /**
1723
+ * Bit field reader
1724
+ *
1725
+ * Note: When returning to a byte read, remaining bits are dropped
1726
+ *
1727
+ * @param {boolean} unsigned - if the value is unsigned
1728
+ * @returns number
1729
+ */
1730
+ bit23(unsigned?: boolean): number;
1731
+ /**
1732
+ * Bit field reader
1733
+ *
1734
+ * Note: When returning to a byte read, remaining bits are dropped
1735
+ *
1736
+ * @param {boolean} unsigned - if the value is unsigned
1737
+ * @returns number
1738
+ */
1739
+ bit23le(unsigned?: boolean): number;
1740
+ /**
1741
+ * Bit field reader
1742
+ *
1743
+ * Note: When returning to a byte read, remaining bits are dropped
1744
+ *
1745
+ * @param {boolean} unsigned - if the value is unsigned
1746
+ * @returns number
1747
+ */
1748
+ bit23be(unsigned?: boolean): number;
1749
+ /**
1750
+ * Bit field reader
1751
+ *
1752
+ * Note: When returning to a byte read, remaining bits are dropped
1753
+ *
1754
+ * @returns number
1755
+ */
1756
+ ubit23(): number;
1757
+ /**
1758
+ * Bit field reader
1759
+ *
1760
+ * Note: When returning to a byte read, remaining bits are dropped
1761
+ *
1762
+ * @returns number
1763
+ */
1764
+ ubit23le(): number;
1765
+ /**
1766
+ * Bit field reader
1767
+ *
1768
+ * Note: When returning to a byte read, remaining bits are dropped
1769
+ *
1770
+ * @returns number
1771
+ */
1772
+ ubit23be(): number;
1773
+ /**
1774
+ * Bit field reader
1775
+ *
1776
+ * Note: When returning to a byte read, remaining bits are dropped
1777
+ *
1778
+ * @param {boolean} unsigned - if the value is unsigned
1779
+ * @returns number
1780
+ */
1781
+ bit24(unsigned?: boolean): number;
1782
+ /**
1783
+ * Bit field reader
1784
+ *
1785
+ * Note: When returning to a byte read, remaining bits are dropped
1786
+ *
1787
+ * @param {boolean} unsigned - if the value is unsigned
1788
+ * @returns number
1789
+ */
1790
+ bit24le(unsigned?: boolean): number;
1791
+ /**
1792
+ * Bit field reader
1793
+ *
1794
+ * Note: When returning to a byte read, remaining bits are dropped
1795
+ *
1796
+ * @param {boolean} unsigned - if the value is unsigned
1797
+ * @returns number
1798
+ */
1799
+ bit24be(unsigned?: boolean): number;
1800
+ /**
1801
+ * Bit field reader
1802
+ *
1803
+ * Note: When returning to a byte read, remaining bits are dropped
1804
+ *
1805
+ * @returns number
1806
+ */
1807
+ ubit24(): number;
1808
+ /**
1809
+ * Bit field reader
1810
+ *
1811
+ * Note: When returning to a byte read, remaining bits are dropped
1812
+ *
1813
+ * @returns number
1814
+ */
1815
+ ubit24le(): number;
1816
+ /**
1817
+ * Bit field reader
1818
+ *
1819
+ * Note: When returning to a byte read, remaining bits are dropped
1820
+ *
1821
+ * @returns number
1822
+ */
1823
+ ubit24be(): number;
1824
+ /**
1825
+ * Bit field reader
1826
+ *
1827
+ * Note: When returning to a byte read, remaining bits are dropped
1828
+ *
1829
+ * @param {boolean} unsigned - if the value is unsigned
1830
+ * @returns number
1831
+ */
1832
+ bit25(unsigned?: boolean): number;
1833
+ /**
1834
+ * Bit field reader
1835
+ *
1836
+ * Note: When returning to a byte read, remaining bits are dropped
1837
+ *
1838
+ * @param {boolean} unsigned - if the value is unsigned
1839
+ * @returns number
1840
+ */
1841
+ bit25le(unsigned?: boolean): number;
1842
+ /**
1843
+ * Bit field reader
1844
+ *
1845
+ * Note: When returning to a byte read, remaining bits are dropped
1846
+ *
1847
+ * @param {boolean} unsigned - if the value is unsigned
1848
+ * @returns number
1849
+ */
1850
+ bit25be(unsigned?: boolean): number;
1851
+ /**
1852
+ * Bit field reader
1853
+ *
1854
+ * Note: When returning to a byte read, remaining bits are dropped
1855
+ *
1856
+ * @returns number
1857
+ */
1858
+ ubit25(): number;
1859
+ /**
1860
+ * Bit field reader
1861
+ *
1862
+ * Note: When returning to a byte read, remaining bits are dropped
1863
+ *
1864
+ * @returns number
1865
+ */
1866
+ ubit25le(): number;
1867
+ /**
1868
+ * Bit field reader
1869
+ *
1870
+ * Note: When returning to a byte read, remaining bits are dropped
1871
+ *
1872
+ * @returns number
1873
+ */
1874
+ ubit25be(): number;
1875
+ /**
1876
+ * Bit field reader
1877
+ *
1878
+ * Note: When returning to a byte read, remaining bits are dropped
1879
+ *
1880
+ * @param {boolean} unsigned - if the value is unsigned
1881
+ * @returns number
1882
+ */
1883
+ bit26(unsigned?: boolean): number;
1884
+ /**
1885
+ * Bit field reader
1886
+ *
1887
+ * Note: When returning to a byte read, remaining bits are dropped
1888
+ *
1889
+ * @param {boolean} unsigned - if the value is unsigned
1890
+ * @returns number
1891
+ */
1892
+ bit26le(unsigned?: boolean): number;
1893
+ /**
1894
+ * Bit field reader
1895
+ *
1896
+ * Note: When returning to a byte read, remaining bits are dropped
1897
+ *
1898
+ * @param {boolean} unsigned - if the value is unsigned
1899
+ * @returns number
1900
+ */
1901
+ bit26be(unsigned?: boolean): number;
1902
+ /**
1903
+ * Bit field reader
1904
+ *
1905
+ * Note: When returning to a byte read, remaining bits are dropped
1906
+ *
1907
+ * @returns number
1908
+ */
1909
+ ubit26(): number;
1910
+ /**
1911
+ * Bit field reader
1912
+ *
1913
+ * Note: When returning to a byte read, remaining bits are dropped
1914
+ *
1915
+ * @returns number
1916
+ */
1917
+ ubit26le(): number;
1918
+ /**
1919
+ * Bit field reader
1920
+ *
1921
+ * Note: When returning to a byte read, remaining bits are dropped
1922
+ *
1923
+ * @returns number
1924
+ */
1925
+ ubit26be(): number;
1926
+ /**
1927
+ * Bit field reader
1928
+ *
1929
+ * Note: When returning to a byte read, remaining bits are dropped
1930
+ *
1931
+ * @param {boolean} unsigned - if the value is unsigned
1932
+ * @returns number
1933
+ */
1934
+ bit27(unsigned?: boolean): number;
1935
+ /**
1936
+ * Bit field reader
1937
+ *
1938
+ * Note: When returning to a byte read, remaining bits are dropped
1939
+ *
1940
+ * @param {boolean} unsigned - if the value is unsigned
1941
+ * @returns number
1942
+ */
1943
+ bit27le(unsigned?: boolean): number;
1944
+ /**
1945
+ * Bit field reader
1946
+ *
1947
+ * Note: When returning to a byte read, remaining bits are dropped
1948
+ *
1949
+ * @param {boolean} unsigned - if the value is unsigned
1950
+ * @returns number
1951
+ */
1952
+ bit27be(unsigned?: boolean): number;
1953
+ /**
1954
+ * Bit field reader
1955
+ *
1956
+ * Note: When returning to a byte read, remaining bits are dropped
1957
+ *
1958
+ * @returns number
1959
+ */
1960
+ ubit27(): number;
1961
+ /**
1962
+ * Bit field reader
1963
+ *
1964
+ * Note: When returning to a byte read, remaining bits are dropped
1965
+ *
1966
+ * @returns number
1967
+ */
1968
+ ubit27le(): number;
1969
+ /**
1970
+ * Bit field reader
1971
+ *
1972
+ * Note: When returning to a byte read, remaining bits are dropped
1973
+ *
1974
+ * @returns number
1975
+ */
1976
+ ubit27be(): number;
1977
+ /**
1978
+ * Bit field reader
1979
+ *
1980
+ * Note: When returning to a byte read, remaining bits are dropped
1981
+ *
1982
+ * @param {boolean} unsigned - if the value is unsigned
1983
+ * @returns number
1984
+ */
1985
+ bit28(unsigned?: boolean): number;
1986
+ /**
1987
+ * Bit field reader
1988
+ *
1989
+ * Note: When returning to a byte read, remaining bits are dropped
1990
+ *
1991
+ * @param {boolean} unsigned - if the value is unsigned
1992
+ * @returns number
1993
+ */
1994
+ bit28le(unsigned?: boolean): number;
1995
+ /**
1996
+ * Bit field reader
1997
+ *
1998
+ * Note: When returning to a byte read, remaining bits are dropped
1999
+ *
2000
+ * @param {boolean} unsigned - if the value is unsigned
2001
+ * @returns number
2002
+ */
2003
+ bit28be(unsigned?: boolean): number;
2004
+ /**
2005
+ * Bit field reader
2006
+ *
2007
+ * Note: When returning to a byte read, remaining bits are dropped
2008
+ *
2009
+ * @returns number
2010
+ */
2011
+ ubit28(): number;
2012
+ /**
2013
+ * Bit field reader
2014
+ *
2015
+ * Note: When returning to a byte read, remaining bits are dropped
2016
+ *
2017
+ * @returns number
2018
+ */
2019
+ ubit28le(): number;
2020
+ /**
2021
+ * Bit field reader
2022
+ *
2023
+ * Note: When returning to a byte read, remaining bits are dropped
2024
+ *
2025
+ * @returns number
2026
+ */
2027
+ ubit28be(): number;
2028
+ /**
2029
+ * Bit field reader
2030
+ *
2031
+ * Note: When returning to a byte read, remaining bits are dropped
2032
+ *
2033
+ * @param {boolean} unsigned - if the value is unsigned
2034
+ * @returns number
2035
+ */
2036
+ bit29(unsigned?: boolean): number;
2037
+ /**
2038
+ * Bit field reader
2039
+ *
2040
+ * Note: When returning to a byte read, remaining bits are dropped
2041
+ *
2042
+ * @param {boolean} unsigned - if the value is unsigned
2043
+ * @returns number
2044
+ */
2045
+ bit29le(unsigned?: boolean): number;
2046
+ /**
2047
+ * Bit field reader
2048
+ *
2049
+ * Note: When returning to a byte read, remaining bits are dropped
2050
+ *
2051
+ * @param {boolean} unsigned - if the value is unsigned
2052
+ * @returns number
2053
+ */
2054
+ bit29be(unsigned?: boolean): number;
2055
+ /**
2056
+ * Bit field reader
2057
+ *
2058
+ * Note: When returning to a byte read, remaining bits are dropped
2059
+ *
2060
+ * @returns number
2061
+ */
2062
+ ubit29(): number;
2063
+ /**
2064
+ * Bit field reader
2065
+ *
2066
+ * Note: When returning to a byte read, remaining bits are dropped
2067
+ *
2068
+ * @returns number
2069
+ */
2070
+ ubit29le(): number;
2071
+ /**
2072
+ * Bit field reader
2073
+ *
2074
+ * Note: When returning to a byte read, remaining bits are dropped
2075
+ *
2076
+ * @returns number
2077
+ */
2078
+ ubit29be(): number;
2079
+ /**
2080
+ * Bit field reader
2081
+ *
2082
+ * Note: When returning to a byte read, remaining bits are dropped
2083
+ *
2084
+ * @param {boolean} unsigned - if the value is unsigned
2085
+ * @returns number
2086
+ */
2087
+ bit30(unsigned?: boolean): number;
2088
+ /**
2089
+ * Bit field reader
2090
+ *
2091
+ * Note: When returning to a byte read, remaining bits are dropped
2092
+ *
2093
+ * @param {boolean} unsigned - if the value is unsigned
2094
+ * @returns number
2095
+ */
2096
+ bit30le(unsigned?: boolean): number;
2097
+ /**
2098
+ * Bit field reader
2099
+ *
2100
+ * Note: When returning to a byte read, remaining bits are dropped
2101
+ *
2102
+ * @param {boolean} unsigned - if the value is unsigned
2103
+ * @returns number
2104
+ */
2105
+ bit30be(unsigned?: boolean): number;
2106
+ /**
2107
+ * Bit field reader
2108
+ *
2109
+ * Note: When returning to a byte read, remaining bits are dropped
2110
+ *
2111
+ * @returns number
2112
+ */
2113
+ ubit30(): number;
2114
+ /**
2115
+ * Bit field reader
2116
+ *
2117
+ * Note: When returning to a byte read, remaining bits are dropped
2118
+ *
2119
+ * @returns number
2120
+ */
2121
+ ubit30le(): number;
2122
+ /**
2123
+ * Bit field reader
2124
+ *
2125
+ * Note: When returning to a byte read, remaining bits are dropped
2126
+ *
2127
+ * @returns number
2128
+ */
2129
+ ubit30be(): number;
2130
+ /**
2131
+ * Bit field reader
2132
+ *
2133
+ * Note: When returning to a byte read, remaining bits are dropped
2134
+ *
2135
+ * @param {boolean} unsigned - if the value is unsigned
2136
+ * @returns number
2137
+ */
2138
+ bit31(unsigned?: boolean): number;
2139
+ /**
2140
+ * Bit field reader
2141
+ *
2142
+ * Note: When returning to a byte read, remaining bits are dropped
2143
+ *
2144
+ * @param {boolean} unsigned - if the value is unsigned
2145
+ * @returns number
2146
+ */
2147
+ bit31le(unsigned?: boolean): number;
2148
+ /**
2149
+ * Bit field reader
2150
+ *
2151
+ * Note: When returning to a byte read, remaining bits are dropped
2152
+ *
2153
+ * @param {boolean} unsigned - if the value is unsigned
2154
+ * @returns number
2155
+ */
2156
+ bit31be(unsigned?: boolean): number;
2157
+ /**
2158
+ * Bit field reader
2159
+ *
2160
+ * Note: When returning to a byte read, remaining bits are dropped
2161
+ *
2162
+ * @returns number
2163
+ */
2164
+ ubit31(): number;
2165
+ /**
2166
+ * Bit field reader
2167
+ *
2168
+ * Note: When returning to a byte read, remaining bits are dropped
2169
+ *
2170
+ * @returns number
2171
+ */
2172
+ ubit31le(): number;
2173
+ /**
2174
+ * Bit field reader
2175
+ *
2176
+ * Note: When returning to a byte read, remaining bits are dropped
2177
+ *
2178
+ * @returns number
2179
+ */
2180
+ ubit31be(): number;
2181
+ /**
2182
+ * Bit field reader
2183
+ *
2184
+ * Note: When returning to a byte read, remaining bits are dropped
2185
+ *
2186
+ * @param {boolean} unsigned - if the value is unsigned
2187
+ * @returns number
2188
+ */
2189
+ bit32(unsigned?: boolean): number;
2190
+ /**
2191
+ * Bit field reader
2192
+ *
2193
+ * Note: When returning to a byte read, remaining bits are dropped
2194
+ *
2195
+ * @param {boolean} unsigned - if the value is unsigned
2196
+ * @returns number
2197
+ */
2198
+ bit32le(unsigned?: boolean): number;
2199
+ /**
2200
+ * Bit field reader
2201
+ *
2202
+ * Note: When returning to a byte read, remaining bits are dropped
2203
+ *
2204
+ * @param {boolean} unsigned - if the value is unsigned
2205
+ * @returns number
2206
+ */
2207
+ bit32be(unsigned?: boolean): number;
2208
+ /**
2209
+ * Bit field reader
2210
+ *
2211
+ * Note: When returning to a byte read, remaining bits are dropped
2212
+ *
2213
+ * @returns number
2214
+ */
2215
+ ubit32(): number;
2216
+ /**
2217
+ * Bit field reader
2218
+ *
2219
+ * Note: When returning to a byte read, remaining bits are dropped
2220
+ *
2221
+ * @returns number
2222
+ */
2223
+ ubit32le(): number;
2224
+ /**
2225
+ * Bit field reader
2226
+ *
2227
+ * Note: When returning to a byte read, remaining bits are dropped
2228
+ *
2229
+ * @returns number
2230
+ */
2231
+ ubit32be(): number;
2232
+ /**
2233
+ * Bit field reader
2234
+ *
2235
+ * Note: When returning to a byte read, remaining bits are dropped
2236
+ *
2237
+ * @param {number} bits - bits to read
2238
+ * @returns number
2239
+ */
2240
+ readUBitBE(bits: number): number;
2241
+ /**
2242
+ * Bit field reader
2243
+ *
2244
+ * Note: When returning to a byte read, remaining bits are dropped
2245
+ *
2246
+ * @param {number} bits - bits to read
2247
+ * @returns number
2248
+ */
2249
+ ubitbe(bits: number): number;
2250
+ /**
2251
+ * Bit field reader
2252
+ *
2253
+ * Note: When returning to a byte read, remaining bits are dropped
2254
+ *
2255
+ * @param {number} bits - bits to read
2256
+ * @param {boolean} unsigned - if the value is unsigned
2257
+ * @returns number
2258
+ */
2259
+ readBitBE(bits: number, unsigned?: boolean): number;
2260
+ /**
2261
+ * Bit field reader
2262
+ *
2263
+ * Note: When returning to a byte read, remaining bits are dropped
2264
+ *
2265
+ * @param {number} bits - bits to read
2266
+ * @param {boolean} unsigned - if the value is unsigned
2267
+ * @returns number
2268
+ */
2269
+ bitbe(bits: number, unsigned?: boolean): number;
2270
+ /**
2271
+ * Bit field reader
2272
+ *
2273
+ * Note: When returning to a byte read, remaining bits are dropped
2274
+ *
2275
+ * @param {number} bits - bits to read
2276
+ * @returns number
2277
+ */
2278
+ readUBitLE(bits: number): number;
2279
+ /**
2280
+ * Bit field reader
2281
+ *
2282
+ * Note: When returning to a byte read, remaining bits are dropped
2283
+ *
2284
+ * @param {number} bits - bits to read
2285
+ * @returns number
2286
+ */
2287
+ ubitle(bits: number): number;
2288
+ /**
2289
+ * Bit field reader
2290
+ *
2291
+ * Note: When returning to a byte read, remaining bits are dropped
2292
+ *
2293
+ * @param {number} bits - bits to read
2294
+ * @param {boolean} unsigned - if the value is unsigned
2295
+ * @returns number
2296
+ */
2297
+ readBitLE(bits: number, unsigned?: boolean): number;
2298
+ /**
2299
+ * Bit field reader
2300
+ *
2301
+ * Note: When returning to a byte read, remaining bits are dropped
2302
+ *
2303
+ * @param {number} bits - bits to read
2304
+ * @param {boolean} unsigned - if the value is unsigned
2305
+ * @returns number
2306
+ */
2307
+ bitle(bits: number, unsigned?: boolean): number;
2308
+ /**
2309
+ * Read byte
2310
+ *
2311
+ * @param {boolean} unsigned - if value is unsigned or not
2312
+ * @returns number
2313
+ */
2314
+ readByte(unsigned?: boolean): number;
2315
+ /**
2316
+ * Write byte
2317
+ *
2318
+ * @param {number} value - value as int
2319
+ * @param {boolean} unsigned - if the value is unsigned
2320
+ */
2321
+ writeByte(value: number, unsigned?: boolean): void;
2322
+ /**
2323
+ * Read byte
2324
+ *
2325
+ * @param {boolean} unsigned - if value is unsigned or not
2326
+ * @returns number
2327
+ */
2328
+ byte(unsigned?: boolean): number;
2329
+ /**
2330
+ * Read byte
2331
+ *
2332
+ * @param {boolean} unsigned - if value is unsigned or not
2333
+ * @returns number
2334
+ */
2335
+ int8(unsigned?: boolean): number;
2336
+ /**
2337
+ * Read unsigned byte
2338
+ *
2339
+ * @returns number
2340
+ */
2341
+ readUByte(): number;
2342
+ /**
2343
+ * Read unsigned byte
2344
+ *
2345
+ * @returns number
2346
+ */
2347
+ uint8(): number;
2348
+ /**
2349
+ * Read unsigned byte
2350
+ *
2351
+ * @returns number
2352
+ */
2353
+ ubyte(): number;
2354
+ /**
2355
+ * Read short
2356
+ *
2357
+ * @param {boolean} unsigned - if value is unsigned or not
2358
+ * @param {string} endian - ```big``` or ```little```
2359
+ * @returns number
2360
+ */
2361
+ readInt16(unsigned?: boolean, endian?: string): number;
2362
+ /**
2363
+ * Write int16
2364
+ *
2365
+ * @param {number} value - value as int
2366
+ * @param {boolean} unsigned - if the value is unsigned
2367
+ * @param {string} endian - ``big`` or ``little`
2368
+ */
2369
+ writeInt16(value: number, unsigned?: boolean, endian?: string): void;
2370
+ /**
2371
+ * Read short
2372
+ *
2373
+ * @param {boolean} unsigned - if value is unsigned or not
2374
+ * @param {string} endian - ```big``` or ```little```
2375
+ * @returns number
2376
+ */
2377
+ int16(unsigned?: boolean, endian?: string): number;
2378
+ /**
2379
+ * Read short
2380
+ *
2381
+ * @param {boolean} unsigned - if value is unsigned or not
2382
+ * @param {string} endian - ```big``` or ```little```
2383
+ * @returns number
2384
+ */
2385
+ short(unsigned?: boolean, endian?: string): number;
2386
+ /**
2387
+ * Read short
2388
+ *
2389
+ * @param {boolean} unsigned - if value is unsigned or not
2390
+ * @param {string} endian - ```big``` or ```little```
2391
+ * @returns number
2392
+ */
2393
+ word(unsigned?: boolean, endian?: string): number;
2394
+ /**
2395
+ * Read unsigned short
2396
+ *
2397
+ * @param {string} endian - ```big``` or ```little```
2398
+ *
2399
+ * @returns number
2400
+ */
2401
+ readUInt16(endian?: string): number;
2402
+ /**
2403
+ * Read unsigned short
2404
+ *
2405
+ * @param {string} endian - ```big``` or ```little```
2406
+ *
2407
+ * @returns number
2408
+ */
2409
+ uint16(endian?: string): number;
2410
+ /**
2411
+ * Read unsigned short
2412
+ *
2413
+ * @param {string} endian - ```big``` or ```little```
2414
+ *
2415
+ * @returns number
2416
+ */
2417
+ ushort(endian?: string): number;
2418
+ /**
2419
+ * Read unsigned short
2420
+ *
2421
+ * @param {string} endian - ```big``` or ```little```
2422
+ *
2423
+ * @returns number
2424
+ */
2425
+ uword(endian?: string): number;
2426
+ /**
2427
+ * Read unsigned short in little endian
2428
+ *
2429
+ * @returns number
2430
+ */
2431
+ readUInt16LE(): number;
2432
+ /**
2433
+ * Read unsigned short in little endian
2434
+ *
2435
+ * @returns number
2436
+ */
2437
+ uint16le(): number;
2438
+ /**
2439
+ * Read unsigned short in little endian
2440
+ *
2441
+ * @returns number
2442
+ */
2443
+ ushortle(): number;
2444
+ /**
2445
+ * Read unsigned short in little endian
2446
+ *
2447
+ * @returns number
2448
+ */
2449
+ uwordle(): number;
2450
+ /**
2451
+ * Read signed short in little endian
2452
+ *
2453
+ * @returns number
2454
+ */
2455
+ readInt16LE(): number;
2456
+ /**
2457
+ * Read signed short in little endian
2458
+ *
2459
+ * @returns number
2460
+ */
2461
+ int16le(): number;
2462
+ /**
2463
+ * Read signed short in little endian
2464
+ *
2465
+ * @returns number
2466
+ */
2467
+ shortle(): number;
2468
+ /**
2469
+ * Read signed short in little endian
2470
+ *
2471
+ * @returns number
2472
+ */
2473
+ wordle(): number;
2474
+ /**
2475
+ * Read unsigned short in big endian
2476
+ *
2477
+ * @returns number
2478
+ */
2479
+ readUInt16BE(): number;
2480
+ /**
2481
+ * Read unsigned short in big endian
2482
+ *
2483
+ * @returns number
2484
+ */
2485
+ uint16be(): number;
2486
+ /**
2487
+ * Read unsigned short in big endian
2488
+ *
2489
+ * @returns number
2490
+ */
2491
+ ushortbe(): number;
2492
+ /**
2493
+ * Read unsigned short in big endian
2494
+ *
2495
+ * @returns number
2496
+ */
2497
+ uwordbe(): number;
2498
+ /**
2499
+ * Read signed short in big endian
2500
+ *
2501
+ * @returns number
2502
+ */
2503
+ readInt16BE(): number;
2504
+ /**
2505
+ * Read signed short in big endian
2506
+ *
2507
+ * @returns number
2508
+ */
2509
+ int16be(): number;
2510
+ /**
2511
+ * Read signed short in big endian
2512
+ *
2513
+ * @returns number
2514
+ */
2515
+ shortbe(): number;
2516
+ /**
2517
+ * Read signed short in big endian
2518
+ *
2519
+ * @returns number
2520
+ */
2521
+ wordbe(): number;
2522
+ /**
2523
+ * Read half float
2524
+ *
2525
+ * @param {string} endian - ```big``` or ```little```
2526
+ * @returns number
2527
+ */
2528
+ readHalfFloat(endian?: string): number;
2529
+ /**
2530
+ * Writes half float
2531
+ *
2532
+ * @param {number} value - value as int
2533
+ * @param {string} endian - ``big`` or ``little`
2534
+ */
2535
+ writeHalfFloat(value: number, endian?: string): void;
2536
+ /**
2537
+ * Read half float
2538
+ *
2539
+ * @param {string} endian - ```big``` or ```little```
2540
+ * @returns number
2541
+ */
2542
+ halffloat(endian?: string): number;
2543
+ /**
2544
+ * Read half float
2545
+ *
2546
+ * @param {string} endian - ```big``` or ```little```
2547
+ * @returns number
2548
+ */
2549
+ half(endian?: string): number;
2550
+ /**
2551
+ * Read half float
2552
+ *
2553
+ * @returns number
2554
+ */
2555
+ readHalfFloatBE(): number;
2556
+ /**
2557
+ * Read half float
2558
+ *
2559
+ * @returns number
2560
+ */
2561
+ halffloatbe(): number;
2562
+ /**
2563
+ * Read half float
2564
+ *
2565
+ * @returns number
2566
+ */
2567
+ halfbe(): number;
2568
+ /**
2569
+ * Read half float
2570
+ *
2571
+ * @returns number
2572
+ */
2573
+ readHalfFloatLE(): number;
2574
+ /**
2575
+ * Read half float
2576
+ *
2577
+ * @returns number
2578
+ */
2579
+ halffloatle(): number;
2580
+ /**
2581
+ * Read half float
2582
+ *
2583
+ * @returns number
2584
+ */
2585
+ halfle(): number;
2586
+ /**
2587
+ * Read 32 bit integer
2588
+ *
2589
+ * @param {boolean} unsigned - if value is unsigned or not
2590
+ * @param {string} endian - ```big``` or ```little```
2591
+ * @returns number
2592
+ */
2593
+ readInt32(unsigned?: boolean, endian?: string): number;
2594
+ /**
2595
+ * Write int32
2596
+ *
2597
+ * @param {number} value - value as int
2598
+ * @param {boolean} unsigned - if the value is unsigned
2599
+ * @param {string} endian - ``big`` or ``little`
2600
+ */
2601
+ writeInt32(value: number, unsigned?: boolean, endian?: string): void;
2602
+ /**
2603
+ * Read 32 bit integer
2604
+ *
2605
+ * @param {boolean} unsigned - if value is unsigned or not
2606
+ * @param {string} endian - ```big``` or ```little```
2607
+ * @returns number
2608
+ */
2609
+ int(unsigned?: boolean, endian?: string): number;
2610
+ /**
2611
+ * Read 32 bit integer
2612
+ *
2613
+ * @param {boolean} unsigned - if value is unsigned or not
2614
+ * @param {string} endian - ```big``` or ```little```
2615
+ * @returns number
2616
+ */
2617
+ double(unsigned?: boolean, endian?: string): number;
2618
+ /**
2619
+ * Read 32 bit integer
2620
+ *
2621
+ * @param {boolean} unsigned - if value is unsigned or not
2622
+ * @param {string} endian - ```big``` or ```little```
2623
+ * @returns number
2624
+ */
2625
+ int32(unsigned?: boolean, endian?: string): number;
2626
+ /**
2627
+ * Read 32 bit integer
2628
+ *
2629
+ * @param {boolean} unsigned - if value is unsigned or not
2630
+ * @param {string} endian - ```big``` or ```little```
2631
+ * @returns number
2632
+ */
2633
+ long(unsigned?: boolean, endian?: string): number;
2634
+ /**
2635
+ * Read unsigned 32 bit integer
2636
+ *
2637
+ * @returns number
2638
+ */
2639
+ readUInt(): number;
2640
+ /**
2641
+ * Read unsigned 32 bit integer
2642
+ *
2643
+ * @returns number
2644
+ */
2645
+ uint(): number;
2646
+ /**
2647
+ * Read unsigned 32 bit integer
2648
+ *
2649
+ * @returns number
2650
+ */
2651
+ udouble(): number;
2652
+ /**
2653
+ * Read unsigned 32 bit integer
2654
+ *
2655
+ * @returns number
2656
+ */
2657
+ uint32(): number;
2658
+ /**
2659
+ * Read unsigned 32 bit integer
2660
+ *
2661
+ * @returns number
2662
+ */
2663
+ ulong(): number;
2664
+ /**
2665
+ * Read signed 32 bit integer
2666
+ *
2667
+ * @returns number
2668
+ */
2669
+ readInt32BE(): number;
2670
+ /**
2671
+ * Read signed 32 bit integer
2672
+ *
2673
+ * @returns number
2674
+ */
2675
+ intbe(): number;
2676
+ /**
2677
+ * Read signed 32 bit integer
2678
+ *
2679
+ * @returns number
2680
+ */
2681
+ doublebe(): number;
2682
+ /**
2683
+ * Read signed 32 bit integer
2684
+ *
2685
+ * @returns number
2686
+ */
2687
+ int32be(): number;
2688
+ /**
2689
+ * Read signed 32 bit integer
2690
+ *
2691
+ * @returns number
2692
+ */
2693
+ longbe(): number;
2694
+ /**
2695
+ * Read unsigned 32 bit integer
2696
+ *
2697
+ * @returns number
2698
+ */
2699
+ readUInt32BE(): number;
2700
+ /**
2701
+ * Read unsigned 32 bit integer
2702
+ *
2703
+ * @returns number
2704
+ */
2705
+ uintbe(): number;
2706
+ /**
2707
+ * Read unsigned 32 bit integer
2708
+ *
2709
+ * @returns number
2710
+ */
2711
+ udoublebe(): number;
2712
+ /**
2713
+ * Read unsigned 32 bit integer
2714
+ *
2715
+ * @returns number
2716
+ */
2717
+ uint32be(): number;
2718
+ /**
2719
+ * Read unsigned 32 bit integer
2720
+ *
2721
+ * @returns number
2722
+ */
2723
+ ulongbe(): number;
2724
+ /**
2725
+ * Read signed 32 bit integer
2726
+ *
2727
+ * @returns number
2728
+ */
2729
+ readInt32LE(): number;
2730
+ /**
2731
+ * Read signed 32 bit integer
2732
+ *
2733
+ * @returns number
2734
+ */
2735
+ intle(): number;
2736
+ /**
2737
+ * Read signed 32 bit integer
2738
+ *
2739
+ * @returns number
2740
+ */
2741
+ doublele(): number;
2742
+ /**
2743
+ * Read signed 32 bit integer
2744
+ *
2745
+ * @returns number
2746
+ */
2747
+ int32le(): number;
2748
+ /**
2749
+ * Read signed 32 bit integer
2750
+ *
2751
+ * @returns number
2752
+ */
2753
+ longle(): number;
2754
+ /**
2755
+ * Read signed 32 bit integer
2756
+ *
2757
+ * @returns number
2758
+ */
2759
+ readUInt32LE(): number;
2760
+ /**
2761
+ * Read signed 32 bit integer
2762
+ *
2763
+ * @returns number
2764
+ */
2765
+ uintle(): number;
2766
+ /**
2767
+ * Read signed 32 bit integer
2768
+ *
2769
+ * @returns number
2770
+ */
2771
+ udoublele(): number;
2772
+ /**
2773
+ * Read signed 32 bit integer
2774
+ *
2775
+ * @returns number
2776
+ */
2777
+ uint32le(): number;
2778
+ /**
2779
+ * Read signed 32 bit integer
2780
+ *
2781
+ * @returns number
2782
+ */
2783
+ ulongle(): number;
2784
+ /**
2785
+ * Read float
2786
+ *
2787
+ * @param {string} endian - ```big``` or ```little```
2788
+ * @returns number
2789
+ */
2790
+ readFloat(endian?: string): number;
2791
+ /**
2792
+ * Write float
2793
+ *
2794
+ * @param {number} value - value as int
2795
+ * @param {string} endian - ``big`` or ``little`
2796
+ */
2797
+ writeFloat(value: number, endian?: string): void;
2798
+ /**
2799
+ * Read float
2800
+ *
2801
+ * @param {string} endian - ```big``` or ```little```
2802
+ * @returns number
2803
+ */
2804
+ float(endian?: string): number;
2805
+ /**
2806
+ * Read float
2807
+ *
2808
+ * @returns number
2809
+ */
2810
+ readFloatBE(): number;
2811
+ /**
2812
+ * Read float
2813
+ *
2814
+ * @returns number
2815
+ */
2816
+ floatbe(): number;
2817
+ /**
2818
+ * Read float
2819
+ *
2820
+ * @returns number
2821
+ */
2822
+ readFloatLE(): number;
2823
+ /**
2824
+ * Read float
2825
+ *
2826
+ * @returns number
2827
+ */
2828
+ floatle(): number;
2829
+ /**
2830
+ * Read signed 64 bit integer
2831
+ * @param {boolean} unsigned - if value is unsigned or not
2832
+ * @param {string} endian - ```big``` or ```little```
2833
+ * @returns number
2834
+ */
2835
+ readInt64(unsigned?: boolean, endian?: string): bigint;
2836
+ /**
2837
+ * Write 64 bit integer
2838
+ *
2839
+ * @param {number} value - value as int
2840
+ * @param {boolean} unsigned - if the value is unsigned
2841
+ * @param {string} endian - ``big`` or ``little`
2842
+ */
2843
+ writeInt64(value: number, unsigned?: boolean, endian?: string): void;
2844
+ /**
2845
+ * Read signed 64 bit integer
2846
+ * @param {boolean} unsigned - if value is unsigned or not
2847
+ * @param {string} endian - ```big``` or ```little```
2848
+ * @returns number
2849
+ */
2850
+ int64(unsigned?: boolean, endian?: string): bigint;
2851
+ /**
2852
+ * Read signed 64 bit integer
2853
+ * @param {boolean} unsigned - if value is unsigned or not
2854
+ * @param {string} endian - ```big``` or ```little```
2855
+ * @returns number
2856
+ */
2857
+ bigint(unsigned?: boolean, endian?: string): bigint;
2858
+ /**
2859
+ * Read signed 64 bit integer
2860
+ * @param {boolean} unsigned - if value is unsigned or not
2861
+ * @param {string} endian - ```big``` or ```little```
2862
+ * @returns number
2863
+ */
2864
+ quad(unsigned?: boolean, endian?: string): bigint;
2865
+ /**
2866
+ * Read unsigned 64 bit integer
2867
+ *
2868
+ * @returns number
2869
+ */
2870
+ readUInt64(): bigint;
2871
+ /**
2872
+ * Read unsigned 64 bit integer
2873
+ *
2874
+ * @returns number
2875
+ */
2876
+ uint64(): bigint;
2877
+ /**
2878
+ * Read unsigned 64 bit integer
2879
+ *
2880
+ * @returns number
2881
+ */
2882
+ ubigint(): bigint;
2883
+ /**
2884
+ * Read unsigned 64 bit integer
2885
+ *
2886
+ * @returns number
2887
+ */
2888
+ uquad(): bigint;
2889
+ /**
2890
+ * Read signed 64 bit integer
2891
+ *
2892
+ * @returns number
2893
+ */
2894
+ readInt64BE(): bigint;
2895
+ /**
2896
+ * Read signed 64 bit integer
2897
+ *
2898
+ * @returns number
2899
+ */
2900
+ int64be(): bigint;
2901
+ /**
2902
+ * Read signed 64 bit integer
2903
+ *
2904
+ * @returns number
2905
+ */
2906
+ bigintbe(): bigint;
2907
+ /**
2908
+ * Read signed 64 bit integer
2909
+ *
2910
+ * @returns number
2911
+ */
2912
+ quadbe(): bigint;
2913
+ /**
2914
+ * Read unsigned 64 bit integer
2915
+ *
2916
+ * @returns number
2917
+ */
2918
+ readUInt64BE(): bigint;
2919
+ /**
2920
+ * Read unsigned 64 bit integer
2921
+ *
2922
+ * @returns number
2923
+ */
2924
+ uint64be(): bigint;
2925
+ /**
2926
+ * Read unsigned 64 bit integer
2927
+ *
2928
+ * @returns number
2929
+ */
2930
+ ubigintbe(): bigint;
2931
+ /**
2932
+ * Read unsigned 64 bit integer
2933
+ *
2934
+ * @returns number
2935
+ */
2936
+ uquadbe(): bigint;
2937
+ /**
2938
+ * Read signed 64 bit integer
2939
+ *
2940
+ * @returns number
2941
+ */
2942
+ readInt64LE(): bigint;
2943
+ /**
2944
+ * Read signed 64 bit integer
2945
+ *
2946
+ * @returns number
2947
+ */
2948
+ int64le(): bigint;
2949
+ /**
2950
+ * Read signed 64 bit integer
2951
+ *
2952
+ * @returns number
2953
+ */
2954
+ bigintle(): bigint;
2955
+ /**
2956
+ * Read signed 64 bit integer
2957
+ *
2958
+ * @returns number
2959
+ */
2960
+ quadle(): bigint;
2961
+ /**
2962
+ * Read unsigned 64 bit integer
2963
+ *
2964
+ * @returns number
2965
+ */
2966
+ readUInt64LE(): bigint;
2967
+ /**
2968
+ * Read unsigned 64 bit integer
2969
+ *
2970
+ * @returns number
2971
+ */
2972
+ uint64le(): bigint;
2973
+ /**
2974
+ * Read unsigned 64 bit integer
2975
+ *
2976
+ * @returns number
2977
+ */
2978
+ ubigintle(): bigint;
2979
+ /**
2980
+ * Read unsigned 64 bit integer
2981
+ *
2982
+ * @returns number
2983
+ */
2984
+ uquadle(): bigint;
2985
+ /**
2986
+ * Read double float
2987
+ *
2988
+ * @param {string} endian - ```big``` or ```little```
2989
+ * @returns number
2990
+ */
2991
+ readDoubleFloat(endian?: string): number;
2992
+ /**
2993
+ * Writes double float
2994
+ *
2995
+ * @param {number} value - value as int
2996
+ * @param {number} offset - byte offset (default last write position)
2997
+ * @param {string} endian - ``big`` or ``little`
2998
+ */
2999
+ writeDoubleFloat(value: number, endian?: string): void;
3000
+ /**
3001
+ * Read double float
3002
+ *
3003
+ * @param {string} endian - ```big``` or ```little```
3004
+ * @returns number
3005
+ */
3006
+ doublefloat(endian?: string): number;
3007
+ /**
3008
+ * Read double float
3009
+ *
3010
+ * @param {string} endian - ```big``` or ```little```
3011
+ * @returns number
3012
+ */
3013
+ dfloat(endian?: string): number;
3014
+ /**
3015
+ * Read double float
3016
+ *
3017
+ * @returns number
3018
+ */
3019
+ readDoubleFloatBE(): number;
3020
+ /**
3021
+ * Read double float
3022
+ *
3023
+ * @returns number
3024
+ */
3025
+ dfloatebe(): number;
3026
+ /**
3027
+ * Read double float
3028
+ *
3029
+ * @returns number
3030
+ */
3031
+ doublefloatbe(): number;
3032
+ /**
3033
+ * Read double float
3034
+ *
3035
+ * @returns number
3036
+ */
3037
+ readDoubleFloatLE(): number;
3038
+ /**
3039
+ * Read double float
3040
+ *
3041
+ * @returns number
3042
+ */
3043
+ dfloatle(): number;
3044
+ /**
3045
+ * Read double float
3046
+ *
3047
+ * @returns number
3048
+ */
3049
+ doublefloatle(): number;
3050
+ /**
3051
+ * Reads string, use options object for different types
3052
+ *
3053
+ * @param {object} options
3054
+ * ```javascript
3055
+ * {
3056
+ * length: number, //for fixed length, non-terminate value utf strings
3057
+ * stringType: "utf-8", //utf-8, utf-16, pascal or wide-pascal
3058
+ * terminateValue: 0x00, // only for non-fixed length utf strings
3059
+ * lengthReadSize: 1, //for pascal strings. 1, 2 or 4 byte length read size
3060
+ * stripNull: true, // removes 0x00 characters
3061
+ * encoding: "utf-8", //TextEncoder accepted types
3062
+ * endian: "little", //for wide-pascal and utf-16
3063
+ * }
3064
+ * ```
3065
+ * @return string
3066
+ */
3067
+ readString(options?: {
3068
+ length?: number;
3069
+ stringType?: string;
3070
+ terminateValue?: number;
3071
+ lengthReadSize?: number;
3072
+ stripNull?: boolean;
3073
+ encoding?: string;
3074
+ endian?: string;
3075
+ }): string;
3076
+ /**
3077
+ * Writes string, use options object for different types
3078
+ *
3079
+ *
3080
+ * @param {string} string - text string
3081
+ * @param {object} options - options:
3082
+ * ```javascript
3083
+ * {
3084
+ * length: string.length, //for fixed length, non-terminate value utf strings
3085
+ * stringType: "utf-8", //utf-8, utf-16, pascal or wide-pascal
3086
+ * terminateValue: 0x00, // only with stringType: "utf"
3087
+ * lengthWriteSize: 1, //for pascal strings. 1, 2 or 4 byte length write size
3088
+ * encoding: "utf-8", //TextEncoder accepted types
3089
+ * endian: "little", //for wide-pascal and utf-16
3090
+ * }
3091
+ * ```
3092
+ */
3093
+ writeString(string: string, options?: {
3094
+ length?: number;
3095
+ stringType?: string;
3096
+ terminateValue?: number;
3097
+ lengthWriteSize?: number;
3098
+ stripNull?: boolean;
3099
+ encoding?: string;
3100
+ endian?: string;
3101
+ }): void;
3102
+ /**
3103
+ * Reads string, use options object for different types
3104
+ *
3105
+ * @param {object} options
3106
+ * ```javascript
3107
+ * {
3108
+ * length: number, //for fixed length, non-terminate value utf strings
3109
+ * stringType: "utf-8", //utf-8, utf-16, pascal or wide-pascal
3110
+ * terminateValue: 0x00, // only for non-fixed length utf strings
3111
+ * lengthReadSize: 1, //for pascal strings. 1, 2 or 4 byte length read size
3112
+ * stripNull: true, // removes 0x00 characters
3113
+ * encoding: "utf-8", //TextEncoder accepted types
3114
+ * endian: "little", //for wide-pascal and utf-16
3115
+ * }
3116
+ * ```
3117
+ * @return string
3118
+ */
3119
+ string(options?: {
3120
+ length?: number;
3121
+ stringType?: string;
3122
+ terminateValue?: number;
3123
+ lengthReadSize?: number;
3124
+ stripNull?: boolean;
3125
+ encoding?: string;
3126
+ endian?: string;
3127
+ }): string;
3128
+ /**
3129
+ * Reads UTF-8 (C) string
3130
+ *
3131
+ * @param {number} length - for fixed length utf strings
3132
+ * @param {number} terminateValue - for non-fixed length utf strings
3133
+ * @param {boolean} stripNull - removes 0x00 characters
3134
+ *
3135
+ * @return string
3136
+ */
3137
+ utf8string(length?: number, terminateValue?: number, stripNull?: boolean): string;
3138
+ /**
3139
+ * Reads UTF-8 (C) string
3140
+ *
3141
+ * @param {number} length - for fixed length utf strings
3142
+ * @param {number} terminateValue - for non-fixed length utf strings
3143
+ * @param {boolean} stripNull - removes 0x00 characters
3144
+ *
3145
+ * @return string
3146
+ */
3147
+ cstring(length?: number, terminateValue?: number, stripNull?: boolean): string;
3148
+ /**
3149
+ * Reads ANSI string
3150
+ *
3151
+ * @param {number} length - for fixed length utf strings
3152
+ * @param {number} terminateValue - for non-fixed length utf strings
3153
+ * @param {boolean} stripNull - removes 0x00 characters
3154
+ *
3155
+ * @return string
3156
+ */
3157
+ ansistring(length?: number, terminateValue?: number, stripNull?: boolean): string;
3158
+ /**
3159
+ * Reads UTF-16 (Unicode) string
3160
+ *
3161
+ * @param {number} length - for fixed length utf strings
3162
+ * @param {number} terminateValue - for non-fixed length utf strings
3163
+ * @param {boolean} stripNull - removes 0x00 characters
3164
+ * @param {string} endian - ``big`` or ``little``
3165
+ *
3166
+ * @return string
3167
+ */
3168
+ utf16string(length?: number, terminateValue?: number, stripNull?: boolean, endian?: string): string;
3169
+ /**
3170
+ * Reads UTF-16 (Unicode) string
3171
+ *
3172
+ * @param {number} length - for fixed length utf strings
3173
+ * @param {number} terminateValue - for non-fixed length utf strings
3174
+ * @param {boolean} stripNull - removes 0x00 characters
3175
+ * @param {string} endian - ``big`` or ``little``
3176
+ *
3177
+ * @return string
3178
+ */
3179
+ unistring(length?: number, terminateValue?: number, stripNull?: boolean, endian?: string): string;
3180
+ /**
3181
+ * Reads UTF-16 (Unicode) string in little endian order
3182
+ *
3183
+ * @param {number} length - for fixed length utf strings
3184
+ * @param {number} terminateValue - for non-fixed length utf strings
3185
+ * @param {boolean} stripNull - removes 0x00 characters
3186
+ *
3187
+ * @return string
3188
+ */
3189
+ utf16stringle(length?: number, terminateValue?: number, stripNull?: boolean): string;
3190
+ /**
3191
+ * Reads UTF-16 (Unicode) string in little endian order
3192
+ *
3193
+ * @param {number} length - for fixed length utf strings
3194
+ * @param {number} terminateValue - for non-fixed length utf strings
3195
+ * @param {boolean} stripNull - removes 0x00 characters
3196
+ *
3197
+ * @return string
3198
+ */
3199
+ unistringle(length?: number, terminateValue?: number, stripNull?: boolean): string;
3200
+ /**
3201
+ * Reads UTF-16 (Unicode) string in big endian order
3202
+ *
3203
+ * @param {number} length - for fixed length utf strings
3204
+ * @param {number} terminateValue - for non-fixed length utf strings
3205
+ * @param {boolean} stripNull - removes 0x00 characters
3206
+ *
3207
+ * @return string
3208
+ */
3209
+ utf16stringbe(length?: number, terminateValue?: number, stripNull?: boolean): string;
3210
+ /**
3211
+ * Reads UTF-16 (Unicode) string in big endian order
3212
+ *
3213
+ * @param {number} length - for fixed length utf strings
3214
+ * @param {number} terminateValue - for non-fixed length utf strings
3215
+ * @param {boolean} stripNull - removes 0x00 characters
3216
+ *
3217
+ * @return string
3218
+ */
3219
+ unistringbe(length?: number, terminateValue?: number, stripNull?: boolean): string;
3220
+ /**
3221
+ * Reads Pascal string
3222
+ *
3223
+ * @param {number} lengthReadSize - 1, 2 or 4 byte length write size (default 1)
3224
+ * @param {boolean} stripNull - removes 0x00 characters
3225
+ * @param {string} endian - ``big`` or ``little``
3226
+ *
3227
+ * @return string
3228
+ */
3229
+ pstring(lengthReadSize?: number, stripNull?: boolean, endian?: string): string;
3230
+ /**
3231
+ * Reads Pascal string 1 byte length read
3232
+ *
3233
+ * @param {boolean} stripNull - removes 0x00 characters
3234
+ * @param {string} endian - ``big`` or ``little``
3235
+ *
3236
+ * @return string
3237
+ */
3238
+ pstring1(stripNull?: boolean, endian?: string): string;
3239
+ /**
3240
+ * Reads Pascal string 1 byte length read in little endian order
3241
+ *
3242
+ * @param {boolean} stripNull - removes 0x00 characters
3243
+ *
3244
+ * @return string
3245
+ */
3246
+ pstring1le(stripNull?: boolean): string;
3247
+ /**
3248
+ * Reads Pascal string 1 byte length read in big endian order
3249
+ *
3250
+ * @param {boolean} stripNull - removes 0x00 characters
3251
+ *
3252
+ * @return string
3253
+ */
3254
+ pstring1be(stripNull?: boolean): string;
3255
+ /**
3256
+ * Reads Pascal string 2 byte length read
3257
+ *
3258
+ * @param {boolean} stripNull - removes 0x00 characters
3259
+ * @param {string} endian - ``big`` or ``little``
3260
+ *
3261
+ * @return string
3262
+ */
3263
+ pstring2(stripNull?: boolean, endian?: string): string;
3264
+ /**
3265
+ * Reads Pascal string 2 byte length read in little endian order
3266
+ *
3267
+ * @param {boolean} stripNull - removes 0x00 characters
3268
+ *
3269
+ * @return string
3270
+ */
3271
+ pstring2le(stripNull?: boolean): string;
3272
+ /**
3273
+ * Reads Pascal string 2 byte length read in big endian order
3274
+ *
3275
+ * @param {boolean} stripNull - removes 0x00 characters
3276
+ *
3277
+ * @return string
3278
+ */
3279
+ pstring2be(stripNull?: boolean): string;
3280
+ /**
3281
+ * Reads Pascal string 4 byte length read
3282
+ *
3283
+ * @param {boolean} stripNull - removes 0x00 characters
3284
+ * @param {string} endian - ``big`` or ``little``
3285
+ *
3286
+ * @return string
3287
+ */
3288
+ pstring4(stripNull?: boolean, endian?: string): string;
3289
+ /**
3290
+ * Reads Pascal string 4 byte length read in little endian order
3291
+ *
3292
+ * @param {boolean} stripNull - removes 0x00 characters
3293
+ *
3294
+ * @return string
3295
+ */
3296
+ pstring4le(stripNull?: boolean): string;
3297
+ /**
3298
+ * Reads Pascal string 4 byte length read in big endian order
3299
+ *
3300
+ * @param {boolean} stripNull - removes 0x00 characters
3301
+ *
3302
+ * @return string
3303
+ */
3304
+ pstring4be(stripNull?: boolean): string;
3305
+ /**
3306
+ * Reads Wide-Pascal string
3307
+ *
3308
+ * @param {number} lengthReadSize - 1, 2 or 4 byte length write size (default 1)
3309
+ * @param {boolean} stripNull - removes 0x00 characters
3310
+ * @param {string} endian - ``big`` or ``little``
3311
+ *
3312
+ * @return string
3313
+ */
3314
+ wpstring(lengthReadSize?: number, stripNull?: boolean, endian?: string): string;
3315
+ /**
3316
+ * Reads Wide-Pascal string 1 byte length read
3317
+ *
3318
+ * @param {boolean} stripNull - removes 0x00 characters
3319
+ * @param {string} endian - ``big`` or ``little``
3320
+ *
3321
+ * @return string
3322
+ */
3323
+ wpstring1(stripNull?: boolean, endian?: string): string;
3324
+ /**
3325
+ * Reads Wide-Pascal string 2 byte length read
3326
+ *
3327
+ * @param {boolean} stripNull - removes 0x00 characters
3328
+ * @param {string} endian - ``big`` or ``little``
3329
+ *
3330
+ * @return string
3331
+ */
3332
+ wpstring2(stripNull?: boolean, endian?: string): string;
3333
+ /**
3334
+ * Reads Wide-Pascal string 2 byte length read in little endian order
3335
+ *
3336
+ * @param {boolean} stripNull - removes 0x00 characters
3337
+ *
3338
+ * @return string
3339
+ */
3340
+ wpstring2le(stripNull?: boolean): string;
3341
+ /**
3342
+ * Reads Wide-Pascal string 2 byte length read in big endian order
3343
+ *
3344
+ * @param {boolean} stripNull - removes 0x00 characters
3345
+ *
3346
+ * @return string
3347
+ */
3348
+ wpstring2be(stripNull?: boolean): string;
3349
+ /**
3350
+ * Reads Wide-Pascal string 4 byte length read
3351
+ *
3352
+ * @param {boolean} stripNull - removes 0x00 characters
3353
+ * @param {string} endian - ``big`` or ``little``
3354
+ *
3355
+ * @return string
3356
+ */
3357
+ wpstring4(stripNull?: boolean, endian?: string): string;
3358
+ /**
3359
+ * Reads Wide-Pascal string 4 byte length read in big endian order
3360
+ *
3361
+ * @param {boolean} stripNull - removes 0x00 characters
3362
+ *
3363
+ * @return string
3364
+ */
3365
+ wpstring4be(stripNull?: boolean): string;
3366
+ /**
3367
+ * Reads Wide-Pascal string 4 byte length read in little endian order
3368
+ *
3369
+ * @param {boolean} stripNull - removes 0x00 characters
3370
+ *
3371
+ * @return string
3372
+ */
3373
+ wpstring4le(stripNull?: boolean): string;
3374
+ }
2
3375
  /**
3
3376
  * Binary writer, includes bitfields and strings
4
3377
  *
@@ -16,10 +3389,8 @@ export declare class biwriter {
16
3389
  strict: boolean;
17
3390
  errorDump: boolean;
18
3391
  data: any;
19
- private isBuffer;
20
3392
  private isBufferOrUint8Array;
21
3393
  extendArray(to_padd: number): void;
22
- private check_size;
23
3394
  /**
24
3395
  * Binary writer, includes bitfields and strings
25
3396
  *
@@ -2626,14 +5997,14 @@ export declare class biwriter {
2626
5997
  * @param {number} value - value as int
2627
5998
  * @param {string} endian - ``big`` or ``little`
2628
5999
  */
2629
- ushort(value: number, offset?: number, endian?: string): void;
6000
+ ushort(value: number, endian?: string): void;
2630
6001
  /**
2631
6002
  * Write unsigned int16
2632
6003
  *
2633
6004
  * @param {number} value - value as int
2634
6005
  * @param {string} endian - ``big`` or ``little`
2635
6006
  */
2636
- uword(value: number, offset?: number, endian?: string): void;
6007
+ uword(value: number, endian?: string): void;
2637
6008
  /**
2638
6009
  * Write signed int16
2639
6010
  *
@@ -2763,13 +6134,13 @@ export declare class biwriter {
2763
6134
  *
2764
6135
  * @param {number} value - value as int
2765
6136
  */
2766
- writeHalfFloatBE(value: number, offset?: number): void;
6137
+ writeHalfFloatBE(value: number): void;
2767
6138
  /**
2768
6139
  * Writes half float
2769
6140
  *
2770
6141
  * @param {number} value - value as int
2771
6142
  */
2772
- halffloatbe(value: number, offset?: number): void;
6143
+ halffloatbe(value: number): void;
2773
6144
  /**
2774
6145
  * Writes half float
2775
6146
  *
@@ -2972,13 +6343,13 @@ export declare class biwriter {
2972
6343
  *
2973
6344
  * @param {number} value - value as int
2974
6345
  */
2975
- writeUInt32BE(value: number, offset?: number): void;
6346
+ writeUInt32BE(value: number): void;
2976
6347
  /**
2977
6348
  * Write unsigned int32
2978
6349
  *
2979
6350
  * @param {number} value - value as int
2980
6351
  */
2981
- uint32be(value: number, offset?: number): void;
6352
+ uint32be(value: number): void;
2982
6353
  /**
2983
6354
  * Write unsigned int32
2984
6355
  *
@@ -3571,4 +6942,4 @@ export declare class biwriter {
3571
6942
  */
3572
6943
  wpstring4be(string: string): void;
3573
6944
  }
3574
- //# sourceMappingURL=writer.d.ts.map
6945
+ //# sourceMappingURL=index.d.ts.map