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