bireader 1.0.24 → 1.0.25
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.js +4 -4
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/src/reader.js +58 -58
- package/lib/cjs/src/reader.js.map +1 -1
- package/lib/cjs/src/writer.js +58 -58
- package/lib/cjs/src/writer.js.map +1 -1
- package/lib/cjs/types/index.d.ts +2 -2
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +2 -2
- package/lib/esm/src/reader.js +1 -1
- package/lib/esm/src/reader.js.map +1 -1
- package/lib/esm/src/writer.js +1 -1
- package/lib/esm/src/writer.js.map +1 -1
- package/lib/esm/types/index.d.ts +2 -2
- package/lib/esm/types/index.d.ts.map +1 -1
- package/package.json +6 -2
package/lib/cjs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.biwriter = exports.bireader = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "bireader", { enumerable: true, get: function () { return
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "biwriter", { enumerable: true, get: function () { return
|
|
4
|
+
var reader_js_1 = require("./src/reader.js");
|
|
5
|
+
Object.defineProperty(exports, "bireader", { enumerable: true, get: function () { return reader_js_1.bireader; } });
|
|
6
|
+
var writer_js_1 = require("./src/writer.js");
|
|
7
|
+
Object.defineProperty(exports, "biwriter", { enumerable: true, get: function () { return writer_js_1.biwriter; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAAjC,qGAAA,QAAQ,OAAA;AAChB,6CAAyC;AAAjC,qGAAA,QAAQ,OAAA"}
|
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
|
*
|
|
@@ -13,16 +13,16 @@ const common_1 = require("./common");
|
|
|
13
13
|
*/
|
|
14
14
|
class bireader {
|
|
15
15
|
isBuffer(obj) {
|
|
16
|
-
return (0,
|
|
16
|
+
return (0, common_js_1.buffcheck)(obj);
|
|
17
17
|
}
|
|
18
18
|
isBufferOrUint8Array(obj) {
|
|
19
|
-
return (0,
|
|
19
|
+
return (0, common_js_1.arraybuffcheck)(this, obj);
|
|
20
20
|
}
|
|
21
21
|
extendArray(to_padd) {
|
|
22
|
-
return (0,
|
|
22
|
+
return (0, common_js_1.extendarray)(this, to_padd);
|
|
23
23
|
}
|
|
24
24
|
check_size(write_bytes, write_bit, offset) {
|
|
25
|
-
return (0,
|
|
25
|
+
return (0, common_js_1.checkSize)(this, write_bytes || 0, write_bit || 0, offset || this.offset);
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Binary reader, includes bitfields and strings
|
|
@@ -142,7 +142,7 @@ class bireader {
|
|
|
142
142
|
* @param {number} bits - Bits to skip (0-7)
|
|
143
143
|
*/
|
|
144
144
|
skip(bytes, bits) {
|
|
145
|
-
return (0,
|
|
145
|
+
return (0, common_js_1.skip)(this, bytes, bits);
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Offset current byte or bit position
|
|
@@ -165,7 +165,7 @@ class bireader {
|
|
|
165
165
|
* @param {number} bit - bit to set to (0-7)
|
|
166
166
|
*/
|
|
167
167
|
goto(byte, bit) {
|
|
168
|
-
return (0,
|
|
168
|
+
return (0, common_js_1.goto)(this, byte, bit);
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
171
|
* Offset current byte or bit position
|
|
@@ -329,7 +329,7 @@ class bireader {
|
|
|
329
329
|
else {
|
|
330
330
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
331
331
|
}
|
|
332
|
-
return (0,
|
|
332
|
+
return (0, common_js_1.XOR)(this, xorKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
333
333
|
}
|
|
334
334
|
/**
|
|
335
335
|
* XOR data
|
|
@@ -355,7 +355,7 @@ class bireader {
|
|
|
355
355
|
else {
|
|
356
356
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
357
357
|
}
|
|
358
|
-
return (0,
|
|
358
|
+
return (0, common_js_1.XOR)(this, XORKey, this.offset, this.offset + Length, consume || false);
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* OR data
|
|
@@ -379,7 +379,7 @@ class bireader {
|
|
|
379
379
|
else {
|
|
380
380
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
381
381
|
}
|
|
382
|
-
return (0,
|
|
382
|
+
return (0, common_js_1.OR)(this, orKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
385
|
* OR data
|
|
@@ -405,7 +405,7 @@ class bireader {
|
|
|
405
405
|
else {
|
|
406
406
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
407
407
|
}
|
|
408
|
-
return (0,
|
|
408
|
+
return (0, common_js_1.OR)(this, ORKey, this.offset, this.offset + Length, consume || false);
|
|
409
409
|
}
|
|
410
410
|
/**
|
|
411
411
|
* AND data
|
|
@@ -429,7 +429,7 @@ class bireader {
|
|
|
429
429
|
else {
|
|
430
430
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
431
431
|
}
|
|
432
|
-
return (0,
|
|
432
|
+
return (0, common_js_1.AND)(this, andKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* AND data
|
|
@@ -455,7 +455,7 @@ class bireader {
|
|
|
455
455
|
else {
|
|
456
456
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
457
457
|
}
|
|
458
|
-
return (0,
|
|
458
|
+
return (0, common_js_1.AND)(this, ANDKey, this.offset, this.offset + Length, consume || false);
|
|
459
459
|
}
|
|
460
460
|
/**
|
|
461
461
|
* Not data
|
|
@@ -465,7 +465,7 @@ class bireader {
|
|
|
465
465
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
466
466
|
*/
|
|
467
467
|
not(startOffset, endOffset, consume) {
|
|
468
|
-
return (0,
|
|
468
|
+
return (0, common_js_1.NOT)(this, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
471
|
* Not data
|
|
@@ -474,7 +474,7 @@ class bireader {
|
|
|
474
474
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
475
475
|
*/
|
|
476
476
|
notThis(length, consume) {
|
|
477
|
-
return (0,
|
|
477
|
+
return (0, common_js_1.NOT)(this, this.offset, this.offset + (length || 1), consume || false);
|
|
478
478
|
}
|
|
479
479
|
/**
|
|
480
480
|
* Left shift data
|
|
@@ -498,7 +498,7 @@ class bireader {
|
|
|
498
498
|
else {
|
|
499
499
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
500
500
|
}
|
|
501
|
-
return (0,
|
|
501
|
+
return (0, common_js_1.LSHIFT)(this, lShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
504
|
* Left shift data
|
|
@@ -524,7 +524,7 @@ class bireader {
|
|
|
524
524
|
else {
|
|
525
525
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
526
526
|
}
|
|
527
|
-
return (0,
|
|
527
|
+
return (0, common_js_1.LSHIFT)(this, shiftKey, this.offset, this.offset + Length, consume || false);
|
|
528
528
|
}
|
|
529
529
|
/**
|
|
530
530
|
* Right shift data
|
|
@@ -548,7 +548,7 @@ class bireader {
|
|
|
548
548
|
else {
|
|
549
549
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
550
550
|
}
|
|
551
|
-
return (0,
|
|
551
|
+
return (0, common_js_1.RSHIFT)(this, rShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
552
552
|
}
|
|
553
553
|
/**
|
|
554
554
|
* Right shift data
|
|
@@ -574,7 +574,7 @@ class bireader {
|
|
|
574
574
|
else {
|
|
575
575
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
576
576
|
}
|
|
577
|
-
return (0,
|
|
577
|
+
return (0, common_js_1.RSHIFT)(this, lShiftKey, this.offset, this.offset + Length, consume || false);
|
|
578
578
|
}
|
|
579
579
|
/**
|
|
580
580
|
* Add value to data
|
|
@@ -598,7 +598,7 @@ class bireader {
|
|
|
598
598
|
else {
|
|
599
599
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
600
600
|
}
|
|
601
|
-
return (0,
|
|
601
|
+
return (0, common_js_1.ADD)(this, addedKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
602
602
|
}
|
|
603
603
|
/**
|
|
604
604
|
* Add value to data
|
|
@@ -624,7 +624,7 @@ class bireader {
|
|
|
624
624
|
else {
|
|
625
625
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
626
626
|
}
|
|
627
|
-
return (0,
|
|
627
|
+
return (0, common_js_1.ADD)(this, AddedKey, this.offset, this.offset + Length, consume || false);
|
|
628
628
|
}
|
|
629
629
|
//
|
|
630
630
|
//remove part of data
|
|
@@ -639,7 +639,7 @@ class bireader {
|
|
|
639
639
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
640
640
|
*/
|
|
641
641
|
delete(startOffset, endOffset, consume) {
|
|
642
|
-
return (0,
|
|
642
|
+
return (0, common_js_1.remove)(this, startOffset || 0, endOffset || this.offset, consume || false, true);
|
|
643
643
|
}
|
|
644
644
|
/**
|
|
645
645
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -648,7 +648,7 @@ class bireader {
|
|
|
648
648
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
649
649
|
*/
|
|
650
650
|
clip() {
|
|
651
|
-
return (0,
|
|
651
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
652
652
|
}
|
|
653
653
|
/**
|
|
654
654
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -657,7 +657,7 @@ class bireader {
|
|
|
657
657
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
658
658
|
*/
|
|
659
659
|
trim() {
|
|
660
|
-
return (0,
|
|
660
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
661
661
|
}
|
|
662
662
|
/**
|
|
663
663
|
* Deletes part of data from current byte position to supplied length, returns removed
|
|
@@ -668,7 +668,7 @@ class bireader {
|
|
|
668
668
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
669
669
|
*/
|
|
670
670
|
crop(length, consume) {
|
|
671
|
-
return (0,
|
|
671
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
672
672
|
}
|
|
673
673
|
/**
|
|
674
674
|
* Deletes part of data from current position to supplied length, returns removed
|
|
@@ -679,7 +679,7 @@ class bireader {
|
|
|
679
679
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
680
680
|
*/
|
|
681
681
|
drop(length, consume) {
|
|
682
|
-
return (0,
|
|
682
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
683
683
|
}
|
|
684
684
|
//
|
|
685
685
|
//copy out
|
|
@@ -694,7 +694,7 @@ class bireader {
|
|
|
694
694
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
695
695
|
*/
|
|
696
696
|
lift(startOffset, endOffset, consume, fillValue) {
|
|
697
|
-
return (0,
|
|
697
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
698
698
|
}
|
|
699
699
|
/**
|
|
700
700
|
* Returns part of data from current byte position to end of data unless supplied
|
|
@@ -706,7 +706,7 @@ class bireader {
|
|
|
706
706
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
707
707
|
*/
|
|
708
708
|
fill(startOffset, endOffset, consume, fillValue) {
|
|
709
|
-
return (0,
|
|
709
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
710
710
|
}
|
|
711
711
|
/**
|
|
712
712
|
* Extract data from current position to length supplied
|
|
@@ -717,7 +717,7 @@ class bireader {
|
|
|
717
717
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
718
718
|
*/
|
|
719
719
|
extract(length, consume) {
|
|
720
|
-
return (0,
|
|
720
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
721
721
|
}
|
|
722
722
|
/**
|
|
723
723
|
* Extract data from current position to length supplied
|
|
@@ -728,7 +728,7 @@ class bireader {
|
|
|
728
728
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
729
729
|
*/
|
|
730
730
|
slice(length, consume) {
|
|
731
|
-
return (0,
|
|
731
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
732
732
|
}
|
|
733
733
|
/**
|
|
734
734
|
* Extract data from current position to length supplied
|
|
@@ -739,7 +739,7 @@ class bireader {
|
|
|
739
739
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
740
740
|
*/
|
|
741
741
|
wrap(length, consume) {
|
|
742
|
-
return (0,
|
|
742
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
743
743
|
}
|
|
744
744
|
//
|
|
745
745
|
//insert
|
|
@@ -753,7 +753,7 @@ class bireader {
|
|
|
753
753
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
754
754
|
*/
|
|
755
755
|
insert(data, consume, offset) {
|
|
756
|
-
return (0,
|
|
756
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
757
757
|
}
|
|
758
758
|
/**
|
|
759
759
|
* Inserts data into data
|
|
@@ -764,7 +764,7 @@ class bireader {
|
|
|
764
764
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
765
765
|
*/
|
|
766
766
|
place(data, consume, offset) {
|
|
767
|
-
return (0,
|
|
767
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
768
768
|
}
|
|
769
769
|
/**
|
|
770
770
|
* Replaces data in data
|
|
@@ -775,7 +775,7 @@ class bireader {
|
|
|
775
775
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
776
776
|
*/
|
|
777
777
|
replace(data, consume, offset) {
|
|
778
|
-
return (0,
|
|
778
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
779
779
|
}
|
|
780
780
|
/**
|
|
781
781
|
* Replaces data in data
|
|
@@ -786,7 +786,7 @@ class bireader {
|
|
|
786
786
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
787
787
|
*/
|
|
788
788
|
overwrite(data, consume, offset) {
|
|
789
|
-
return (0,
|
|
789
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
790
790
|
}
|
|
791
791
|
/**
|
|
792
792
|
* Adds data to start of supplied data
|
|
@@ -796,7 +796,7 @@ class bireader {
|
|
|
796
796
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
797
797
|
*/
|
|
798
798
|
unshift(data, consume) {
|
|
799
|
-
return (0,
|
|
799
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
800
800
|
}
|
|
801
801
|
/**
|
|
802
802
|
* Adds data to start of supplied data
|
|
@@ -806,7 +806,7 @@ class bireader {
|
|
|
806
806
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
807
807
|
*/
|
|
808
808
|
prepend(data, consume) {
|
|
809
|
-
return (0,
|
|
809
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
810
810
|
}
|
|
811
811
|
/**
|
|
812
812
|
* Adds data to end of supplied data
|
|
@@ -816,7 +816,7 @@ class bireader {
|
|
|
816
816
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
817
817
|
*/
|
|
818
818
|
push(data, consume) {
|
|
819
|
-
return (0,
|
|
819
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
820
820
|
}
|
|
821
821
|
/**
|
|
822
822
|
* Adds data to end of supplied data
|
|
@@ -826,7 +826,7 @@ class bireader {
|
|
|
826
826
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
827
827
|
*/
|
|
828
828
|
append(data, consume) {
|
|
829
|
-
return (0,
|
|
829
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
830
830
|
}
|
|
831
831
|
//
|
|
832
832
|
//finishing
|
|
@@ -884,7 +884,7 @@ class bireader {
|
|
|
884
884
|
* ```
|
|
885
885
|
*/
|
|
886
886
|
hexdump(options) {
|
|
887
|
-
return (0,
|
|
887
|
+
return (0, common_js_1.hexDump)(this, options);
|
|
888
888
|
}
|
|
889
889
|
/**
|
|
890
890
|
* Turn hexdump on error off (default on)
|
|
@@ -913,7 +913,7 @@ class bireader {
|
|
|
913
913
|
* @param {string} endian - ``big`` or ``little``
|
|
914
914
|
*/
|
|
915
915
|
writeBit(value, bits, unsigned, endian) {
|
|
916
|
-
return (0,
|
|
916
|
+
return (0, common_js_1.wbit)(this, value, bits, unsigned, endian);
|
|
917
917
|
}
|
|
918
918
|
/**
|
|
919
919
|
* Bit field reader
|
|
@@ -926,7 +926,7 @@ class bireader {
|
|
|
926
926
|
* @returns number
|
|
927
927
|
*/
|
|
928
928
|
readBit(bits, unsigned, endian) {
|
|
929
|
-
return (0,
|
|
929
|
+
return (0, common_js_1.rbit)(this, bits, unsigned, endian);
|
|
930
930
|
}
|
|
931
931
|
/**
|
|
932
932
|
* Bit field reader
|
|
@@ -3060,7 +3060,7 @@ class bireader {
|
|
|
3060
3060
|
* @returns number
|
|
3061
3061
|
*/
|
|
3062
3062
|
readByte(unsigned) {
|
|
3063
|
-
return (0,
|
|
3063
|
+
return (0, common_js_1.rbyte)(this, unsigned);
|
|
3064
3064
|
}
|
|
3065
3065
|
/**
|
|
3066
3066
|
* Write byte
|
|
@@ -3069,7 +3069,7 @@ class bireader {
|
|
|
3069
3069
|
* @param {boolean} unsigned - if the value is unsigned
|
|
3070
3070
|
*/
|
|
3071
3071
|
writeByte(value, unsigned) {
|
|
3072
|
-
return (0,
|
|
3072
|
+
return (0, common_js_1.wbyte)(this, value, unsigned);
|
|
3073
3073
|
}
|
|
3074
3074
|
/**
|
|
3075
3075
|
* Read byte
|
|
@@ -3124,7 +3124,7 @@ class bireader {
|
|
|
3124
3124
|
* @returns number
|
|
3125
3125
|
*/
|
|
3126
3126
|
readInt16(unsigned, endian) {
|
|
3127
|
-
return (0,
|
|
3127
|
+
return (0, common_js_1.rint16)(this, unsigned, endian);
|
|
3128
3128
|
}
|
|
3129
3129
|
/**
|
|
3130
3130
|
* Write int16
|
|
@@ -3134,7 +3134,7 @@ class bireader {
|
|
|
3134
3134
|
* @param {string} endian - ``big`` or ``little`
|
|
3135
3135
|
*/
|
|
3136
3136
|
writeInt16(value, unsigned, endian) {
|
|
3137
|
-
return (0,
|
|
3137
|
+
return (0, common_js_1.wint16)(this, value, unsigned, endian);
|
|
3138
3138
|
}
|
|
3139
3139
|
/**
|
|
3140
3140
|
* Read short
|
|
@@ -3344,7 +3344,7 @@ class bireader {
|
|
|
3344
3344
|
* @returns number
|
|
3345
3345
|
*/
|
|
3346
3346
|
readHalfFloat(endian) {
|
|
3347
|
-
return (0,
|
|
3347
|
+
return (0, common_js_1.rhalffloat)(this, endian);
|
|
3348
3348
|
}
|
|
3349
3349
|
/**
|
|
3350
3350
|
* Writes half float
|
|
@@ -3353,7 +3353,7 @@ class bireader {
|
|
|
3353
3353
|
* @param {string} endian - ``big`` or ``little`
|
|
3354
3354
|
*/
|
|
3355
3355
|
writeHalfFloat(value, endian) {
|
|
3356
|
-
return (0,
|
|
3356
|
+
return (0, common_js_1.whalffloat)(this, value, endian);
|
|
3357
3357
|
}
|
|
3358
3358
|
/**
|
|
3359
3359
|
* Read half float
|
|
@@ -3432,7 +3432,7 @@ class bireader {
|
|
|
3432
3432
|
* @returns number
|
|
3433
3433
|
*/
|
|
3434
3434
|
readInt32(unsigned, endian) {
|
|
3435
|
-
return (0,
|
|
3435
|
+
return (0, common_js_1.rint32)(this, unsigned, endian);
|
|
3436
3436
|
}
|
|
3437
3437
|
/**
|
|
3438
3438
|
* Write int32
|
|
@@ -3442,7 +3442,7 @@ class bireader {
|
|
|
3442
3442
|
* @param {string} endian - ``big`` or ``little`
|
|
3443
3443
|
*/
|
|
3444
3444
|
writeInt32(value, unsigned, endian) {
|
|
3445
|
-
return (0,
|
|
3445
|
+
return (0, common_js_1.wint32)(this, value, unsigned, endian);
|
|
3446
3446
|
}
|
|
3447
3447
|
/**
|
|
3448
3448
|
* Read 32 bit integer
|
|
@@ -3694,7 +3694,7 @@ class bireader {
|
|
|
3694
3694
|
* @returns number
|
|
3695
3695
|
*/
|
|
3696
3696
|
readFloat(endian) {
|
|
3697
|
-
return (0,
|
|
3697
|
+
return (0, common_js_1.rfloat)(this, endian);
|
|
3698
3698
|
}
|
|
3699
3699
|
/**
|
|
3700
3700
|
* Write float
|
|
@@ -3703,7 +3703,7 @@ class bireader {
|
|
|
3703
3703
|
* @param {string} endian - ``big`` or ``little`
|
|
3704
3704
|
*/
|
|
3705
3705
|
writeFloat(value, endian) {
|
|
3706
|
-
return (0,
|
|
3706
|
+
return (0, common_js_1.wfloat)(this, value, endian);
|
|
3707
3707
|
}
|
|
3708
3708
|
/**
|
|
3709
3709
|
* Read float
|
|
@@ -3756,7 +3756,7 @@ class bireader {
|
|
|
3756
3756
|
* @returns number
|
|
3757
3757
|
*/
|
|
3758
3758
|
readInt64(unsigned, endian) {
|
|
3759
|
-
return (0,
|
|
3759
|
+
return (0, common_js_1.rint64)(this, unsigned, endian);
|
|
3760
3760
|
}
|
|
3761
3761
|
/**
|
|
3762
3762
|
* Write 64 bit integer
|
|
@@ -3766,7 +3766,7 @@ class bireader {
|
|
|
3766
3766
|
* @param {string} endian - ``big`` or ``little`
|
|
3767
3767
|
*/
|
|
3768
3768
|
writeInt64(value, unsigned, endian) {
|
|
3769
|
-
return (0,
|
|
3769
|
+
return (0, common_js_1.wint64)(this, value, unsigned, endian);
|
|
3770
3770
|
}
|
|
3771
3771
|
/**
|
|
3772
3772
|
* Read signed 64 bit integer
|
|
@@ -3965,7 +3965,7 @@ class bireader {
|
|
|
3965
3965
|
* @returns number
|
|
3966
3966
|
*/
|
|
3967
3967
|
readDoubleFloat(endian) {
|
|
3968
|
-
return (0,
|
|
3968
|
+
return (0, common_js_1.rdfloat)(this, endian);
|
|
3969
3969
|
}
|
|
3970
3970
|
/**
|
|
3971
3971
|
* Writes double float
|
|
@@ -3975,7 +3975,7 @@ class bireader {
|
|
|
3975
3975
|
* @param {string} endian - ``big`` or ``little`
|
|
3976
3976
|
*/
|
|
3977
3977
|
writeDoubleFloat(value, endian) {
|
|
3978
|
-
return (0,
|
|
3978
|
+
return (0, common_js_1.wdfloat)(this, value, endian);
|
|
3979
3979
|
}
|
|
3980
3980
|
/**
|
|
3981
3981
|
* Read double float
|
|
@@ -4064,7 +4064,7 @@ class bireader {
|
|
|
4064
4064
|
* @return string
|
|
4065
4065
|
*/
|
|
4066
4066
|
readString(options) {
|
|
4067
|
-
return (0,
|
|
4067
|
+
return (0, common_js_1.rstring)(this, options);
|
|
4068
4068
|
}
|
|
4069
4069
|
/**
|
|
4070
4070
|
* Writes string, use options object for different types
|
|
@@ -4084,7 +4084,7 @@ class bireader {
|
|
|
4084
4084
|
* ```
|
|
4085
4085
|
*/
|
|
4086
4086
|
writeString(string, options) {
|
|
4087
|
-
return (0,
|
|
4087
|
+
return (0, common_js_1.wstring)(this, string, options);
|
|
4088
4088
|
}
|
|
4089
4089
|
/**
|
|
4090
4090
|
* Reads string, use options object for different types
|