bireader 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/index.js +4 -4
- package/lib/cjs/index.js.map +1 -1
- package/lib/{esm/types → cjs}/src/common.d.ts +2 -0
- package/lib/cjs/src/common.d.ts.map +1 -0
- package/lib/cjs/src/common.js +29 -21
- package/lib/cjs/src/common.js.map +1 -1
- package/lib/cjs/{types/src → src}/reader.d.ts +0 -2
- package/lib/cjs/src/reader.d.ts.map +1 -0
- package/lib/cjs/src/reader.js +56 -62
- package/lib/cjs/src/reader.js.map +1 -1
- package/lib/cjs/{types/src → src}/writer.d.ts +6 -8
- package/lib/cjs/src/writer.d.ts.map +1 -0
- package/lib/cjs/src/writer.js +62 -68
- package/lib/cjs/src/writer.js.map +1 -1
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +2 -2
- package/lib/{cjs/types → esm}/src/common.d.ts +2 -0
- package/lib/esm/src/common.d.ts.map +1 -0
- package/lib/esm/src/common.js +26 -20
- package/lib/esm/src/common.js.map +1 -1
- package/lib/esm/{types/src → src}/reader.d.ts +0 -2
- package/lib/esm/src/reader.d.ts.map +1 -0
- package/lib/esm/src/reader.js +1 -7
- package/lib/esm/src/reader.js.map +1 -1
- package/lib/esm/{types/src → src}/writer.d.ts +6 -8
- package/lib/esm/src/writer.d.ts.map +1 -0
- package/lib/esm/src/writer.js +7 -13
- package/lib/esm/src/writer.js.map +1 -1
- package/package.json +12 -5
- package/src/common.ts +1408 -0
- package/src/reader.ts +4853 -0
- package/src/writer.ts +5149 -0
- package/lib/cjs/types/index.d.ts +0 -3
- package/lib/cjs/types/index.d.ts.map +0 -1
- package/lib/cjs/types/src/common.d.ts.map +0 -1
- package/lib/cjs/types/src/reader.d.ts.map +0 -1
- package/lib/cjs/types/src/writer.d.ts.map +0 -1
- package/lib/esm/types/index.d.ts +0 -3
- package/lib/esm/types/index.d.ts.map +0 -1
- package/lib/esm/types/src/common.d.ts.map +0 -1
- package/lib/esm/types/src/reader.d.ts.map +0 -1
- package/lib/esm/types/src/writer.d.ts.map +0 -1
package/lib/cjs/src/reader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bireader = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_js_1 = require("./common.js");
|
|
5
5
|
/**
|
|
6
6
|
* Binary reader, includes bitfields and strings
|
|
7
7
|
*
|
|
@@ -12,17 +12,11 @@ const common_1 = require("./common");
|
|
|
12
12
|
* @param {boolean} strict - Strict mode: if true does not extend supplied array on outside write (default true)
|
|
13
13
|
*/
|
|
14
14
|
class bireader {
|
|
15
|
-
isBuffer(obj) {
|
|
16
|
-
return (0, common_1.buffcheck)(obj);
|
|
17
|
-
}
|
|
18
15
|
isBufferOrUint8Array(obj) {
|
|
19
|
-
return (0,
|
|
16
|
+
return (0, common_js_1.arraybuffcheck)(this, obj);
|
|
20
17
|
}
|
|
21
18
|
extendArray(to_padd) {
|
|
22
|
-
return (0,
|
|
23
|
-
}
|
|
24
|
-
check_size(write_bytes, write_bit, offset) {
|
|
25
|
-
return (0, common_1.checkSize)(this, write_bytes || 0, write_bit || 0, offset || this.offset);
|
|
19
|
+
return (0, common_js_1.extendarray)(this, to_padd);
|
|
26
20
|
}
|
|
27
21
|
/**
|
|
28
22
|
* Binary reader, includes bitfields and strings
|
|
@@ -142,7 +136,7 @@ class bireader {
|
|
|
142
136
|
* @param {number} bits - Bits to skip (0-7)
|
|
143
137
|
*/
|
|
144
138
|
skip(bytes, bits) {
|
|
145
|
-
return (0,
|
|
139
|
+
return (0, common_js_1.skip)(this, bytes, bits);
|
|
146
140
|
}
|
|
147
141
|
/**
|
|
148
142
|
* Offset current byte or bit position
|
|
@@ -165,7 +159,7 @@ class bireader {
|
|
|
165
159
|
* @param {number} bit - bit to set to (0-7)
|
|
166
160
|
*/
|
|
167
161
|
goto(byte, bit) {
|
|
168
|
-
return (0,
|
|
162
|
+
return (0, common_js_1.goto)(this, byte, bit);
|
|
169
163
|
}
|
|
170
164
|
/**
|
|
171
165
|
* Offset current byte or bit position
|
|
@@ -329,7 +323,7 @@ class bireader {
|
|
|
329
323
|
else {
|
|
330
324
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
331
325
|
}
|
|
332
|
-
return (0,
|
|
326
|
+
return (0, common_js_1.XOR)(this, xorKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
333
327
|
}
|
|
334
328
|
/**
|
|
335
329
|
* XOR data
|
|
@@ -355,7 +349,7 @@ class bireader {
|
|
|
355
349
|
else {
|
|
356
350
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
357
351
|
}
|
|
358
|
-
return (0,
|
|
352
|
+
return (0, common_js_1.XOR)(this, XORKey, this.offset, this.offset + Length, consume || false);
|
|
359
353
|
}
|
|
360
354
|
/**
|
|
361
355
|
* OR data
|
|
@@ -379,7 +373,7 @@ class bireader {
|
|
|
379
373
|
else {
|
|
380
374
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
381
375
|
}
|
|
382
|
-
return (0,
|
|
376
|
+
return (0, common_js_1.OR)(this, orKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
383
377
|
}
|
|
384
378
|
/**
|
|
385
379
|
* OR data
|
|
@@ -405,7 +399,7 @@ class bireader {
|
|
|
405
399
|
else {
|
|
406
400
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
407
401
|
}
|
|
408
|
-
return (0,
|
|
402
|
+
return (0, common_js_1.OR)(this, ORKey, this.offset, this.offset + Length, consume || false);
|
|
409
403
|
}
|
|
410
404
|
/**
|
|
411
405
|
* AND data
|
|
@@ -429,7 +423,7 @@ class bireader {
|
|
|
429
423
|
else {
|
|
430
424
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
431
425
|
}
|
|
432
|
-
return (0,
|
|
426
|
+
return (0, common_js_1.AND)(this, andKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
433
427
|
}
|
|
434
428
|
/**
|
|
435
429
|
* AND data
|
|
@@ -455,7 +449,7 @@ class bireader {
|
|
|
455
449
|
else {
|
|
456
450
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
457
451
|
}
|
|
458
|
-
return (0,
|
|
452
|
+
return (0, common_js_1.AND)(this, ANDKey, this.offset, this.offset + Length, consume || false);
|
|
459
453
|
}
|
|
460
454
|
/**
|
|
461
455
|
* Not data
|
|
@@ -465,7 +459,7 @@ class bireader {
|
|
|
465
459
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
466
460
|
*/
|
|
467
461
|
not(startOffset, endOffset, consume) {
|
|
468
|
-
return (0,
|
|
462
|
+
return (0, common_js_1.NOT)(this, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
469
463
|
}
|
|
470
464
|
/**
|
|
471
465
|
* Not data
|
|
@@ -474,7 +468,7 @@ class bireader {
|
|
|
474
468
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
475
469
|
*/
|
|
476
470
|
notThis(length, consume) {
|
|
477
|
-
return (0,
|
|
471
|
+
return (0, common_js_1.NOT)(this, this.offset, this.offset + (length || 1), consume || false);
|
|
478
472
|
}
|
|
479
473
|
/**
|
|
480
474
|
* Left shift data
|
|
@@ -498,7 +492,7 @@ class bireader {
|
|
|
498
492
|
else {
|
|
499
493
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
500
494
|
}
|
|
501
|
-
return (0,
|
|
495
|
+
return (0, common_js_1.LSHIFT)(this, lShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
502
496
|
}
|
|
503
497
|
/**
|
|
504
498
|
* Left shift data
|
|
@@ -524,7 +518,7 @@ class bireader {
|
|
|
524
518
|
else {
|
|
525
519
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
526
520
|
}
|
|
527
|
-
return (0,
|
|
521
|
+
return (0, common_js_1.LSHIFT)(this, shiftKey, this.offset, this.offset + Length, consume || false);
|
|
528
522
|
}
|
|
529
523
|
/**
|
|
530
524
|
* Right shift data
|
|
@@ -548,7 +542,7 @@ class bireader {
|
|
|
548
542
|
else {
|
|
549
543
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
550
544
|
}
|
|
551
|
-
return (0,
|
|
545
|
+
return (0, common_js_1.RSHIFT)(this, rShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
552
546
|
}
|
|
553
547
|
/**
|
|
554
548
|
* Right shift data
|
|
@@ -574,7 +568,7 @@ class bireader {
|
|
|
574
568
|
else {
|
|
575
569
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
576
570
|
}
|
|
577
|
-
return (0,
|
|
571
|
+
return (0, common_js_1.RSHIFT)(this, lShiftKey, this.offset, this.offset + Length, consume || false);
|
|
578
572
|
}
|
|
579
573
|
/**
|
|
580
574
|
* Add value to data
|
|
@@ -598,7 +592,7 @@ class bireader {
|
|
|
598
592
|
else {
|
|
599
593
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
600
594
|
}
|
|
601
|
-
return (0,
|
|
595
|
+
return (0, common_js_1.ADD)(this, addedKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
602
596
|
}
|
|
603
597
|
/**
|
|
604
598
|
* Add value to data
|
|
@@ -624,7 +618,7 @@ class bireader {
|
|
|
624
618
|
else {
|
|
625
619
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
626
620
|
}
|
|
627
|
-
return (0,
|
|
621
|
+
return (0, common_js_1.ADD)(this, AddedKey, this.offset, this.offset + Length, consume || false);
|
|
628
622
|
}
|
|
629
623
|
//
|
|
630
624
|
//remove part of data
|
|
@@ -639,7 +633,7 @@ class bireader {
|
|
|
639
633
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
640
634
|
*/
|
|
641
635
|
delete(startOffset, endOffset, consume) {
|
|
642
|
-
return (0,
|
|
636
|
+
return (0, common_js_1.remove)(this, startOffset || 0, endOffset || this.offset, consume || false, true);
|
|
643
637
|
}
|
|
644
638
|
/**
|
|
645
639
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -648,7 +642,7 @@ class bireader {
|
|
|
648
642
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
649
643
|
*/
|
|
650
644
|
clip() {
|
|
651
|
-
return (0,
|
|
645
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
652
646
|
}
|
|
653
647
|
/**
|
|
654
648
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -657,7 +651,7 @@ class bireader {
|
|
|
657
651
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
658
652
|
*/
|
|
659
653
|
trim() {
|
|
660
|
-
return (0,
|
|
654
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
661
655
|
}
|
|
662
656
|
/**
|
|
663
657
|
* Deletes part of data from current byte position to supplied length, returns removed
|
|
@@ -668,7 +662,7 @@ class bireader {
|
|
|
668
662
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
669
663
|
*/
|
|
670
664
|
crop(length, consume) {
|
|
671
|
-
return (0,
|
|
665
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
672
666
|
}
|
|
673
667
|
/**
|
|
674
668
|
* Deletes part of data from current position to supplied length, returns removed
|
|
@@ -679,7 +673,7 @@ class bireader {
|
|
|
679
673
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
680
674
|
*/
|
|
681
675
|
drop(length, consume) {
|
|
682
|
-
return (0,
|
|
676
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
683
677
|
}
|
|
684
678
|
//
|
|
685
679
|
//copy out
|
|
@@ -694,7 +688,7 @@ class bireader {
|
|
|
694
688
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
695
689
|
*/
|
|
696
690
|
lift(startOffset, endOffset, consume, fillValue) {
|
|
697
|
-
return (0,
|
|
691
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
698
692
|
}
|
|
699
693
|
/**
|
|
700
694
|
* Returns part of data from current byte position to end of data unless supplied
|
|
@@ -706,7 +700,7 @@ class bireader {
|
|
|
706
700
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
707
701
|
*/
|
|
708
702
|
fill(startOffset, endOffset, consume, fillValue) {
|
|
709
|
-
return (0,
|
|
703
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
710
704
|
}
|
|
711
705
|
/**
|
|
712
706
|
* Extract data from current position to length supplied
|
|
@@ -717,7 +711,7 @@ class bireader {
|
|
|
717
711
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
718
712
|
*/
|
|
719
713
|
extract(length, consume) {
|
|
720
|
-
return (0,
|
|
714
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
721
715
|
}
|
|
722
716
|
/**
|
|
723
717
|
* Extract data from current position to length supplied
|
|
@@ -728,7 +722,7 @@ class bireader {
|
|
|
728
722
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
729
723
|
*/
|
|
730
724
|
slice(length, consume) {
|
|
731
|
-
return (0,
|
|
725
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
732
726
|
}
|
|
733
727
|
/**
|
|
734
728
|
* Extract data from current position to length supplied
|
|
@@ -739,7 +733,7 @@ class bireader {
|
|
|
739
733
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
740
734
|
*/
|
|
741
735
|
wrap(length, consume) {
|
|
742
|
-
return (0,
|
|
736
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
743
737
|
}
|
|
744
738
|
//
|
|
745
739
|
//insert
|
|
@@ -753,7 +747,7 @@ class bireader {
|
|
|
753
747
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
754
748
|
*/
|
|
755
749
|
insert(data, consume, offset) {
|
|
756
|
-
return (0,
|
|
750
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
757
751
|
}
|
|
758
752
|
/**
|
|
759
753
|
* Inserts data into data
|
|
@@ -764,7 +758,7 @@ class bireader {
|
|
|
764
758
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
765
759
|
*/
|
|
766
760
|
place(data, consume, offset) {
|
|
767
|
-
return (0,
|
|
761
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
768
762
|
}
|
|
769
763
|
/**
|
|
770
764
|
* Replaces data in data
|
|
@@ -775,7 +769,7 @@ class bireader {
|
|
|
775
769
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
776
770
|
*/
|
|
777
771
|
replace(data, consume, offset) {
|
|
778
|
-
return (0,
|
|
772
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
779
773
|
}
|
|
780
774
|
/**
|
|
781
775
|
* Replaces data in data
|
|
@@ -786,7 +780,7 @@ class bireader {
|
|
|
786
780
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
787
781
|
*/
|
|
788
782
|
overwrite(data, consume, offset) {
|
|
789
|
-
return (0,
|
|
783
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
790
784
|
}
|
|
791
785
|
/**
|
|
792
786
|
* Adds data to start of supplied data
|
|
@@ -796,7 +790,7 @@ class bireader {
|
|
|
796
790
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
797
791
|
*/
|
|
798
792
|
unshift(data, consume) {
|
|
799
|
-
return (0,
|
|
793
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
800
794
|
}
|
|
801
795
|
/**
|
|
802
796
|
* Adds data to start of supplied data
|
|
@@ -806,7 +800,7 @@ class bireader {
|
|
|
806
800
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
807
801
|
*/
|
|
808
802
|
prepend(data, consume) {
|
|
809
|
-
return (0,
|
|
803
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
810
804
|
}
|
|
811
805
|
/**
|
|
812
806
|
* Adds data to end of supplied data
|
|
@@ -816,7 +810,7 @@ class bireader {
|
|
|
816
810
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
817
811
|
*/
|
|
818
812
|
push(data, consume) {
|
|
819
|
-
return (0,
|
|
813
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
820
814
|
}
|
|
821
815
|
/**
|
|
822
816
|
* Adds data to end of supplied data
|
|
@@ -826,7 +820,7 @@ class bireader {
|
|
|
826
820
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
827
821
|
*/
|
|
828
822
|
append(data, consume) {
|
|
829
|
-
return (0,
|
|
823
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
830
824
|
}
|
|
831
825
|
//
|
|
832
826
|
//finishing
|
|
@@ -884,7 +878,7 @@ class bireader {
|
|
|
884
878
|
* ```
|
|
885
879
|
*/
|
|
886
880
|
hexdump(options) {
|
|
887
|
-
return (0,
|
|
881
|
+
return (0, common_js_1.hexDump)(this, options);
|
|
888
882
|
}
|
|
889
883
|
/**
|
|
890
884
|
* Turn hexdump on error off (default on)
|
|
@@ -913,7 +907,7 @@ class bireader {
|
|
|
913
907
|
* @param {string} endian - ``big`` or ``little``
|
|
914
908
|
*/
|
|
915
909
|
writeBit(value, bits, unsigned, endian) {
|
|
916
|
-
return (0,
|
|
910
|
+
return (0, common_js_1.wbit)(this, value, bits, unsigned, endian);
|
|
917
911
|
}
|
|
918
912
|
/**
|
|
919
913
|
* Bit field reader
|
|
@@ -926,7 +920,7 @@ class bireader {
|
|
|
926
920
|
* @returns number
|
|
927
921
|
*/
|
|
928
922
|
readBit(bits, unsigned, endian) {
|
|
929
|
-
return (0,
|
|
923
|
+
return (0, common_js_1.rbit)(this, bits, unsigned, endian);
|
|
930
924
|
}
|
|
931
925
|
/**
|
|
932
926
|
* Bit field reader
|
|
@@ -3060,7 +3054,7 @@ class bireader {
|
|
|
3060
3054
|
* @returns number
|
|
3061
3055
|
*/
|
|
3062
3056
|
readByte(unsigned) {
|
|
3063
|
-
return (0,
|
|
3057
|
+
return (0, common_js_1.rbyte)(this, unsigned);
|
|
3064
3058
|
}
|
|
3065
3059
|
/**
|
|
3066
3060
|
* Write byte
|
|
@@ -3069,7 +3063,7 @@ class bireader {
|
|
|
3069
3063
|
* @param {boolean} unsigned - if the value is unsigned
|
|
3070
3064
|
*/
|
|
3071
3065
|
writeByte(value, unsigned) {
|
|
3072
|
-
return (0,
|
|
3066
|
+
return (0, common_js_1.wbyte)(this, value, unsigned);
|
|
3073
3067
|
}
|
|
3074
3068
|
/**
|
|
3075
3069
|
* Read byte
|
|
@@ -3124,7 +3118,7 @@ class bireader {
|
|
|
3124
3118
|
* @returns number
|
|
3125
3119
|
*/
|
|
3126
3120
|
readInt16(unsigned, endian) {
|
|
3127
|
-
return (0,
|
|
3121
|
+
return (0, common_js_1.rint16)(this, unsigned, endian);
|
|
3128
3122
|
}
|
|
3129
3123
|
/**
|
|
3130
3124
|
* Write int16
|
|
@@ -3134,7 +3128,7 @@ class bireader {
|
|
|
3134
3128
|
* @param {string} endian - ``big`` or ``little`
|
|
3135
3129
|
*/
|
|
3136
3130
|
writeInt16(value, unsigned, endian) {
|
|
3137
|
-
return (0,
|
|
3131
|
+
return (0, common_js_1.wint16)(this, value, unsigned, endian);
|
|
3138
3132
|
}
|
|
3139
3133
|
/**
|
|
3140
3134
|
* Read short
|
|
@@ -3344,7 +3338,7 @@ class bireader {
|
|
|
3344
3338
|
* @returns number
|
|
3345
3339
|
*/
|
|
3346
3340
|
readHalfFloat(endian) {
|
|
3347
|
-
return (0,
|
|
3341
|
+
return (0, common_js_1.rhalffloat)(this, endian);
|
|
3348
3342
|
}
|
|
3349
3343
|
/**
|
|
3350
3344
|
* Writes half float
|
|
@@ -3353,7 +3347,7 @@ class bireader {
|
|
|
3353
3347
|
* @param {string} endian - ``big`` or ``little`
|
|
3354
3348
|
*/
|
|
3355
3349
|
writeHalfFloat(value, endian) {
|
|
3356
|
-
return (0,
|
|
3350
|
+
return (0, common_js_1.whalffloat)(this, value, endian);
|
|
3357
3351
|
}
|
|
3358
3352
|
/**
|
|
3359
3353
|
* Read half float
|
|
@@ -3432,7 +3426,7 @@ class bireader {
|
|
|
3432
3426
|
* @returns number
|
|
3433
3427
|
*/
|
|
3434
3428
|
readInt32(unsigned, endian) {
|
|
3435
|
-
return (0,
|
|
3429
|
+
return (0, common_js_1.rint32)(this, unsigned, endian);
|
|
3436
3430
|
}
|
|
3437
3431
|
/**
|
|
3438
3432
|
* Write int32
|
|
@@ -3442,7 +3436,7 @@ class bireader {
|
|
|
3442
3436
|
* @param {string} endian - ``big`` or ``little`
|
|
3443
3437
|
*/
|
|
3444
3438
|
writeInt32(value, unsigned, endian) {
|
|
3445
|
-
return (0,
|
|
3439
|
+
return (0, common_js_1.wint32)(this, value, unsigned, endian);
|
|
3446
3440
|
}
|
|
3447
3441
|
/**
|
|
3448
3442
|
* Read 32 bit integer
|
|
@@ -3694,7 +3688,7 @@ class bireader {
|
|
|
3694
3688
|
* @returns number
|
|
3695
3689
|
*/
|
|
3696
3690
|
readFloat(endian) {
|
|
3697
|
-
return (0,
|
|
3691
|
+
return (0, common_js_1.rfloat)(this, endian);
|
|
3698
3692
|
}
|
|
3699
3693
|
/**
|
|
3700
3694
|
* Write float
|
|
@@ -3703,7 +3697,7 @@ class bireader {
|
|
|
3703
3697
|
* @param {string} endian - ``big`` or ``little`
|
|
3704
3698
|
*/
|
|
3705
3699
|
writeFloat(value, endian) {
|
|
3706
|
-
return (0,
|
|
3700
|
+
return (0, common_js_1.wfloat)(this, value, endian);
|
|
3707
3701
|
}
|
|
3708
3702
|
/**
|
|
3709
3703
|
* Read float
|
|
@@ -3756,7 +3750,7 @@ class bireader {
|
|
|
3756
3750
|
* @returns number
|
|
3757
3751
|
*/
|
|
3758
3752
|
readInt64(unsigned, endian) {
|
|
3759
|
-
return (0,
|
|
3753
|
+
return (0, common_js_1.rint64)(this, unsigned, endian);
|
|
3760
3754
|
}
|
|
3761
3755
|
/**
|
|
3762
3756
|
* Write 64 bit integer
|
|
@@ -3766,7 +3760,7 @@ class bireader {
|
|
|
3766
3760
|
* @param {string} endian - ``big`` or ``little`
|
|
3767
3761
|
*/
|
|
3768
3762
|
writeInt64(value, unsigned, endian) {
|
|
3769
|
-
return (0,
|
|
3763
|
+
return (0, common_js_1.wint64)(this, value, unsigned, endian);
|
|
3770
3764
|
}
|
|
3771
3765
|
/**
|
|
3772
3766
|
* Read signed 64 bit integer
|
|
@@ -3965,7 +3959,7 @@ class bireader {
|
|
|
3965
3959
|
* @returns number
|
|
3966
3960
|
*/
|
|
3967
3961
|
readDoubleFloat(endian) {
|
|
3968
|
-
return (0,
|
|
3962
|
+
return (0, common_js_1.rdfloat)(this, endian);
|
|
3969
3963
|
}
|
|
3970
3964
|
/**
|
|
3971
3965
|
* Writes double float
|
|
@@ -3975,7 +3969,7 @@ class bireader {
|
|
|
3975
3969
|
* @param {string} endian - ``big`` or ``little`
|
|
3976
3970
|
*/
|
|
3977
3971
|
writeDoubleFloat(value, endian) {
|
|
3978
|
-
return (0,
|
|
3972
|
+
return (0, common_js_1.wdfloat)(this, value, endian);
|
|
3979
3973
|
}
|
|
3980
3974
|
/**
|
|
3981
3975
|
* Read double float
|
|
@@ -4064,7 +4058,7 @@ class bireader {
|
|
|
4064
4058
|
* @return string
|
|
4065
4059
|
*/
|
|
4066
4060
|
readString(options) {
|
|
4067
|
-
return (0,
|
|
4061
|
+
return (0, common_js_1.rstring)(this, options);
|
|
4068
4062
|
}
|
|
4069
4063
|
/**
|
|
4070
4064
|
* Writes string, use options object for different types
|
|
@@ -4084,7 +4078,7 @@ class bireader {
|
|
|
4084
4078
|
* ```
|
|
4085
4079
|
*/
|
|
4086
4080
|
writeString(string, options) {
|
|
4087
|
-
return (0,
|
|
4081
|
+
return (0, common_js_1.wstring)(this, string, options);
|
|
4088
4082
|
}
|
|
4089
4083
|
/**
|
|
4090
4084
|
* Reads string, use options object for different types
|