bireader 1.0.23 → 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/README.md +2 -2
- package/lib/cjs/index.js +4 -4
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/src/reader.js +63 -63
- package/lib/cjs/src/reader.js.map +1 -1
- package/lib/cjs/src/writer.js +63 -63
- 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/cjs/types/src/reader.d.ts +4 -4
- package/lib/cjs/types/src/reader.d.ts.map +1 -1
- package/lib/cjs/types/src/writer.d.ts +4 -4
- package/lib/cjs/types/src/writer.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 +6 -6
- package/lib/esm/src/reader.js.map +1 -1
- package/lib/esm/src/writer.js +6 -6
- 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/lib/esm/types/src/reader.d.ts +4 -4
- package/lib/esm/types/src/reader.d.ts.map +1 -1
- package/lib/esm/types/src/writer.d.ts +4 -4
- package/lib/esm/types/src/writer.d.ts.map +1 -1
- package/package.json +6 -2
package/lib/cjs/src/writer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.biwriter = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_js_1 = require("./common.js");
|
|
5
5
|
/**
|
|
6
6
|
* Binary writer, includes bitfields and strings
|
|
7
7
|
*
|
|
@@ -13,16 +13,16 @@ const common_1 = require("./common");
|
|
|
13
13
|
*/
|
|
14
14
|
class biwriter {
|
|
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 writer, includes bitfields and strings
|
|
@@ -147,7 +147,7 @@ class biwriter {
|
|
|
147
147
|
* @param {number} bits - Bits to skip (0-7)
|
|
148
148
|
*/
|
|
149
149
|
skip(bytes, bits) {
|
|
150
|
-
return (0,
|
|
150
|
+
return (0, common_js_1.skip)(this, bytes, bits);
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* Offset current byte or bit position
|
|
@@ -170,17 +170,17 @@ class biwriter {
|
|
|
170
170
|
* @param {number} bit - bit to set to (0-7)
|
|
171
171
|
*/
|
|
172
172
|
goto(byte, bit) {
|
|
173
|
-
return (0,
|
|
173
|
+
return (0, common_js_1.goto)(this, byte, bit);
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
176
|
+
* Offset current byte or bit position
|
|
177
177
|
* Note: Will extend array if strict mode is off and outside of max size
|
|
178
178
|
*
|
|
179
|
-
* @param {number}
|
|
180
|
-
* @param {number}
|
|
179
|
+
* @param {number} bytes - Bytes to skip
|
|
180
|
+
* @param {number} bits - Bits to skip (0-7)
|
|
181
181
|
*/
|
|
182
|
-
seek(
|
|
183
|
-
return this.
|
|
182
|
+
seek(bytes, bits) {
|
|
183
|
+
return this.skip(bytes, bits);
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
186
|
* Change position directly to address
|
|
@@ -334,7 +334,7 @@ class biwriter {
|
|
|
334
334
|
else {
|
|
335
335
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
336
336
|
}
|
|
337
|
-
return (0,
|
|
337
|
+
return (0, common_js_1.XOR)(this, xorKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
340
340
|
* XOR data
|
|
@@ -360,7 +360,7 @@ class biwriter {
|
|
|
360
360
|
else {
|
|
361
361
|
throw new Error("XOR must be a number, string, Uint8Array or Buffer");
|
|
362
362
|
}
|
|
363
|
-
return (0,
|
|
363
|
+
return (0, common_js_1.XOR)(this, XORKey, this.offset, this.offset + Length, consume || false);
|
|
364
364
|
}
|
|
365
365
|
/**
|
|
366
366
|
* OR data
|
|
@@ -384,7 +384,7 @@ class biwriter {
|
|
|
384
384
|
else {
|
|
385
385
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
386
386
|
}
|
|
387
|
-
return (0,
|
|
387
|
+
return (0, common_js_1.OR)(this, orKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
388
388
|
}
|
|
389
389
|
/**
|
|
390
390
|
* OR data
|
|
@@ -410,7 +410,7 @@ class biwriter {
|
|
|
410
410
|
else {
|
|
411
411
|
throw new Error("OR must be a number, string, Uint8Array or Buffer");
|
|
412
412
|
}
|
|
413
|
-
return (0,
|
|
413
|
+
return (0, common_js_1.OR)(this, ORKey, this.offset, this.offset + Length, consume || false);
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
416
|
* AND data
|
|
@@ -434,7 +434,7 @@ class biwriter {
|
|
|
434
434
|
else {
|
|
435
435
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
436
436
|
}
|
|
437
|
-
return (0,
|
|
437
|
+
return (0, common_js_1.AND)(this, andKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
440
440
|
* AND data
|
|
@@ -460,7 +460,7 @@ class biwriter {
|
|
|
460
460
|
else {
|
|
461
461
|
throw new Error("AND must be a number, string, number array or Buffer");
|
|
462
462
|
}
|
|
463
|
-
return (0,
|
|
463
|
+
return (0, common_js_1.AND)(this, ANDKey, this.offset, this.offset + Length, consume || false);
|
|
464
464
|
}
|
|
465
465
|
/**
|
|
466
466
|
* Not data
|
|
@@ -470,7 +470,7 @@ class biwriter {
|
|
|
470
470
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
471
471
|
*/
|
|
472
472
|
not(startOffset, endOffset, consume) {
|
|
473
|
-
return (0,
|
|
473
|
+
return (0, common_js_1.NOT)(this, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
474
474
|
}
|
|
475
475
|
/**
|
|
476
476
|
* Not data
|
|
@@ -479,7 +479,7 @@ class biwriter {
|
|
|
479
479
|
* @param {boolean} consume - Move current position to end of data (default false)
|
|
480
480
|
*/
|
|
481
481
|
notThis(length, consume) {
|
|
482
|
-
return (0,
|
|
482
|
+
return (0, common_js_1.NOT)(this, this.offset, this.offset + (length || 1), consume || false);
|
|
483
483
|
}
|
|
484
484
|
/**
|
|
485
485
|
* Left shift data
|
|
@@ -503,7 +503,7 @@ class biwriter {
|
|
|
503
503
|
else {
|
|
504
504
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
505
505
|
}
|
|
506
|
-
return (0,
|
|
506
|
+
return (0, common_js_1.LSHIFT)(this, lShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
507
507
|
}
|
|
508
508
|
/**
|
|
509
509
|
* Left shift data
|
|
@@ -529,7 +529,7 @@ class biwriter {
|
|
|
529
529
|
else {
|
|
530
530
|
throw new Error("Left shift must be a number, string, number array or Buffer");
|
|
531
531
|
}
|
|
532
|
-
return (0,
|
|
532
|
+
return (0, common_js_1.LSHIFT)(this, shiftKey, this.offset, this.offset + Length, consume || false);
|
|
533
533
|
}
|
|
534
534
|
/**
|
|
535
535
|
* Right shift data
|
|
@@ -553,7 +553,7 @@ class biwriter {
|
|
|
553
553
|
else {
|
|
554
554
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
555
555
|
}
|
|
556
|
-
return (0,
|
|
556
|
+
return (0, common_js_1.RSHIFT)(this, rShiftKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
557
557
|
}
|
|
558
558
|
/**
|
|
559
559
|
* Right shift data
|
|
@@ -579,7 +579,7 @@ class biwriter {
|
|
|
579
579
|
else {
|
|
580
580
|
throw new Error("Right shift must be a number, string, number array or Buffer");
|
|
581
581
|
}
|
|
582
|
-
return (0,
|
|
582
|
+
return (0, common_js_1.RSHIFT)(this, lShiftKey, this.offset, this.offset + Length, consume || false);
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
585
|
* Add value to data
|
|
@@ -603,7 +603,7 @@ class biwriter {
|
|
|
603
603
|
else {
|
|
604
604
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
605
605
|
}
|
|
606
|
-
return (0,
|
|
606
|
+
return (0, common_js_1.ADD)(this, addedKey, startOffset || this.offset, endOffset || this.size, consume || false);
|
|
607
607
|
}
|
|
608
608
|
/**
|
|
609
609
|
* Add value to data
|
|
@@ -629,7 +629,7 @@ class biwriter {
|
|
|
629
629
|
else {
|
|
630
630
|
throw new Error("Add key must be a number, string, number array or Buffer");
|
|
631
631
|
}
|
|
632
|
-
return (0,
|
|
632
|
+
return (0, common_js_1.ADD)(this, AddedKey, this.offset, this.offset + Length, consume || false);
|
|
633
633
|
}
|
|
634
634
|
//
|
|
635
635
|
//remove part of data
|
|
@@ -644,7 +644,7 @@ class biwriter {
|
|
|
644
644
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
645
645
|
*/
|
|
646
646
|
delete(startOffset, endOffset, consume) {
|
|
647
|
-
return (0,
|
|
647
|
+
return (0, common_js_1.remove)(this, startOffset || 0, endOffset || this.offset, consume || false, true);
|
|
648
648
|
}
|
|
649
649
|
/**
|
|
650
650
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -653,7 +653,7 @@ class biwriter {
|
|
|
653
653
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
654
654
|
*/
|
|
655
655
|
clip() {
|
|
656
|
-
return (0,
|
|
656
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
657
657
|
}
|
|
658
658
|
/**
|
|
659
659
|
* Deletes part of data from current byte position to end, returns removed
|
|
@@ -662,7 +662,7 @@ class biwriter {
|
|
|
662
662
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
663
663
|
*/
|
|
664
664
|
trim() {
|
|
665
|
-
return (0,
|
|
665
|
+
return (0, common_js_1.remove)(this, this.offset, this.size, false, true);
|
|
666
666
|
}
|
|
667
667
|
/**
|
|
668
668
|
* Deletes part of data from current byte position to supplied length, returns removed
|
|
@@ -673,7 +673,7 @@ class biwriter {
|
|
|
673
673
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
674
674
|
*/
|
|
675
675
|
crop(length, consume) {
|
|
676
|
-
return (0,
|
|
676
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
677
677
|
}
|
|
678
678
|
/**
|
|
679
679
|
* Deletes part of data from current position to supplied length, returns removed
|
|
@@ -684,7 +684,7 @@ class biwriter {
|
|
|
684
684
|
* @returns {Buffer|Uint8Array} Removed data as ``Buffer`` or ``Uint8Array``
|
|
685
685
|
*/
|
|
686
686
|
drop(length, consume) {
|
|
687
|
-
return (0,
|
|
687
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, true);
|
|
688
688
|
}
|
|
689
689
|
//
|
|
690
690
|
//copy out
|
|
@@ -699,7 +699,7 @@ class biwriter {
|
|
|
699
699
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
700
700
|
*/
|
|
701
701
|
lift(startOffset, endOffset, consume, fillValue) {
|
|
702
|
-
return (0,
|
|
702
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
703
703
|
}
|
|
704
704
|
/**
|
|
705
705
|
* Returns part of data from current byte position to end of data unless supplied
|
|
@@ -711,7 +711,7 @@ class biwriter {
|
|
|
711
711
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
712
712
|
*/
|
|
713
713
|
fill(startOffset, endOffset, consume, fillValue) {
|
|
714
|
-
return (0,
|
|
714
|
+
return (0, common_js_1.remove)(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
715
715
|
}
|
|
716
716
|
/**
|
|
717
717
|
* Extract data from current position to length supplied
|
|
@@ -722,7 +722,7 @@ class biwriter {
|
|
|
722
722
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
723
723
|
*/
|
|
724
724
|
extract(length, consume) {
|
|
725
|
-
return (0,
|
|
725
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
726
726
|
}
|
|
727
727
|
/**
|
|
728
728
|
* Extract data from current position to length supplied
|
|
@@ -733,7 +733,7 @@ class biwriter {
|
|
|
733
733
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
734
734
|
*/
|
|
735
735
|
slice(length, consume) {
|
|
736
|
-
return (0,
|
|
736
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
737
737
|
}
|
|
738
738
|
/**
|
|
739
739
|
* Extract data from current position to length supplied
|
|
@@ -744,7 +744,7 @@ class biwriter {
|
|
|
744
744
|
* @returns {Buffer|Uint8Array} Selected data as ```Uint8Array``` or ```Buffer```
|
|
745
745
|
*/
|
|
746
746
|
wrap(length, consume) {
|
|
747
|
-
return (0,
|
|
747
|
+
return (0, common_js_1.remove)(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
748
748
|
}
|
|
749
749
|
//
|
|
750
750
|
//insert
|
|
@@ -758,7 +758,7 @@ class biwriter {
|
|
|
758
758
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
759
759
|
*/
|
|
760
760
|
insert(data, consume, offset) {
|
|
761
|
-
return (0,
|
|
761
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
762
762
|
}
|
|
763
763
|
/**
|
|
764
764
|
* Inserts data into data
|
|
@@ -769,7 +769,7 @@ class biwriter {
|
|
|
769
769
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
770
770
|
*/
|
|
771
771
|
place(data, consume, offset) {
|
|
772
|
-
return (0,
|
|
772
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset);
|
|
773
773
|
}
|
|
774
774
|
/**
|
|
775
775
|
* Replaces data in data
|
|
@@ -780,7 +780,7 @@ class biwriter {
|
|
|
780
780
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
781
781
|
*/
|
|
782
782
|
replace(data, consume, offset) {
|
|
783
|
-
return (0,
|
|
783
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
784
784
|
}
|
|
785
785
|
/**
|
|
786
786
|
* Replaces data in data
|
|
@@ -791,7 +791,7 @@ class biwriter {
|
|
|
791
791
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
792
792
|
*/
|
|
793
793
|
overwrite(data, consume, offset) {
|
|
794
|
-
return (0,
|
|
794
|
+
return (0, common_js_1.addData)(this, data, consume || false, offset || this.offset, true);
|
|
795
795
|
}
|
|
796
796
|
/**
|
|
797
797
|
* Adds data to start of supplied data
|
|
@@ -801,7 +801,7 @@ class biwriter {
|
|
|
801
801
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
802
802
|
*/
|
|
803
803
|
unshift(data, consume) {
|
|
804
|
-
return (0,
|
|
804
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
805
805
|
}
|
|
806
806
|
/**
|
|
807
807
|
* Adds data to start of supplied data
|
|
@@ -811,7 +811,7 @@ class biwriter {
|
|
|
811
811
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
812
812
|
*/
|
|
813
813
|
prepend(data, consume) {
|
|
814
|
-
return (0,
|
|
814
|
+
return (0, common_js_1.addData)(this, data, consume || false, 0);
|
|
815
815
|
}
|
|
816
816
|
/**
|
|
817
817
|
* Adds data to end of supplied data
|
|
@@ -821,7 +821,7 @@ class biwriter {
|
|
|
821
821
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
822
822
|
*/
|
|
823
823
|
push(data, consume) {
|
|
824
|
-
return (0,
|
|
824
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
825
825
|
}
|
|
826
826
|
/**
|
|
827
827
|
* Adds data to end of supplied data
|
|
@@ -831,7 +831,7 @@ class biwriter {
|
|
|
831
831
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
832
832
|
*/
|
|
833
833
|
append(data, consume) {
|
|
834
|
-
return (0,
|
|
834
|
+
return (0, common_js_1.addData)(this, data, consume || false, this.size);
|
|
835
835
|
}
|
|
836
836
|
//
|
|
837
837
|
//finishing
|
|
@@ -889,7 +889,7 @@ class biwriter {
|
|
|
889
889
|
* ```
|
|
890
890
|
*/
|
|
891
891
|
hexdump(options) {
|
|
892
|
-
return (0,
|
|
892
|
+
return (0, common_js_1.hexDump)(this, options);
|
|
893
893
|
}
|
|
894
894
|
/**
|
|
895
895
|
* Turn hexdump on error off (default on)
|
|
@@ -918,7 +918,7 @@ class biwriter {
|
|
|
918
918
|
* @param {string} endian - ``big`` or ``little``
|
|
919
919
|
*/
|
|
920
920
|
writeBit(value, bits, unsigned, endian) {
|
|
921
|
-
return (0,
|
|
921
|
+
return (0, common_js_1.wbit)(this, value, bits, unsigned, endian);
|
|
922
922
|
}
|
|
923
923
|
/**
|
|
924
924
|
* Bit field reader
|
|
@@ -931,7 +931,7 @@ class biwriter {
|
|
|
931
931
|
* @returns number
|
|
932
932
|
*/
|
|
933
933
|
readBit(bits, unsigned, endian) {
|
|
934
|
-
return (0,
|
|
934
|
+
return (0, common_js_1.rbit)(this, bits, unsigned, endian);
|
|
935
935
|
}
|
|
936
936
|
/**
|
|
937
937
|
* Bit field writer
|
|
@@ -3329,7 +3329,7 @@ class biwriter {
|
|
|
3329
3329
|
* @param {boolean} unsigned - if the value is unsigned
|
|
3330
3330
|
*/
|
|
3331
3331
|
writeByte(value, unsigned) {
|
|
3332
|
-
return (0,
|
|
3332
|
+
return (0, common_js_1.wbyte)(this, value, unsigned);
|
|
3333
3333
|
}
|
|
3334
3334
|
/**
|
|
3335
3335
|
* Read byte
|
|
@@ -3338,7 +3338,7 @@ class biwriter {
|
|
|
3338
3338
|
* @returns number
|
|
3339
3339
|
*/
|
|
3340
3340
|
readByte(unsigned) {
|
|
3341
|
-
return (0,
|
|
3341
|
+
return (0, common_js_1.rbyte)(this, unsigned);
|
|
3342
3342
|
}
|
|
3343
3343
|
/**
|
|
3344
3344
|
* Write byte
|
|
@@ -3393,7 +3393,7 @@ class biwriter {
|
|
|
3393
3393
|
* @param {string} endian - ``big`` or ``little`
|
|
3394
3394
|
*/
|
|
3395
3395
|
writeInt16(value, unsigned, endian) {
|
|
3396
|
-
return (0,
|
|
3396
|
+
return (0, common_js_1.wint16)(this, value, unsigned, endian);
|
|
3397
3397
|
}
|
|
3398
3398
|
/**
|
|
3399
3399
|
* Read short
|
|
@@ -3403,7 +3403,7 @@ class biwriter {
|
|
|
3403
3403
|
* @returns number
|
|
3404
3404
|
*/
|
|
3405
3405
|
readInt16(unsigned, endian) {
|
|
3406
|
-
return (0,
|
|
3406
|
+
return (0, common_js_1.rint16)(this, unsigned, endian);
|
|
3407
3407
|
}
|
|
3408
3408
|
/**
|
|
3409
3409
|
* Write int16
|
|
@@ -3609,7 +3609,7 @@ class biwriter {
|
|
|
3609
3609
|
* @param {string} endian - ``big`` or ``little`
|
|
3610
3610
|
*/
|
|
3611
3611
|
writeHalfFloat(value, endian) {
|
|
3612
|
-
return (0,
|
|
3612
|
+
return (0, common_js_1.whalffloat)(this, value, endian);
|
|
3613
3613
|
}
|
|
3614
3614
|
/**
|
|
3615
3615
|
* Read half float
|
|
@@ -3618,7 +3618,7 @@ class biwriter {
|
|
|
3618
3618
|
* @returns number
|
|
3619
3619
|
*/
|
|
3620
3620
|
readHalfFloat(endian) {
|
|
3621
|
-
return (0,
|
|
3621
|
+
return (0, common_js_1.rhalffloat)(this, endian);
|
|
3622
3622
|
}
|
|
3623
3623
|
/**
|
|
3624
3624
|
* Writes half float
|
|
@@ -3697,7 +3697,7 @@ class biwriter {
|
|
|
3697
3697
|
* @param {string} endian - ``big`` or ``little`
|
|
3698
3698
|
*/
|
|
3699
3699
|
writeInt32(value, unsigned, endian) {
|
|
3700
|
-
return (0,
|
|
3700
|
+
return (0, common_js_1.wint32)(this, value, unsigned, endian);
|
|
3701
3701
|
}
|
|
3702
3702
|
/**
|
|
3703
3703
|
* Read 32 bit integer
|
|
@@ -3707,7 +3707,7 @@ class biwriter {
|
|
|
3707
3707
|
* @returns number
|
|
3708
3708
|
*/
|
|
3709
3709
|
readInt32(unsigned, endian) {
|
|
3710
|
-
return (0,
|
|
3710
|
+
return (0, common_js_1.rint32)(this, unsigned, endian);
|
|
3711
3711
|
}
|
|
3712
3712
|
/**
|
|
3713
3713
|
* Write int32
|
|
@@ -3964,7 +3964,7 @@ class biwriter {
|
|
|
3964
3964
|
* @param {string} endian - ``big`` or ``little`
|
|
3965
3965
|
*/
|
|
3966
3966
|
writeFloat(value, endian) {
|
|
3967
|
-
return (0,
|
|
3967
|
+
return (0, common_js_1.wfloat)(this, value, endian);
|
|
3968
3968
|
}
|
|
3969
3969
|
/**
|
|
3970
3970
|
* Read float
|
|
@@ -3973,7 +3973,7 @@ class biwriter {
|
|
|
3973
3973
|
* @returns number
|
|
3974
3974
|
*/
|
|
3975
3975
|
readFloat(endian) {
|
|
3976
|
-
return (0,
|
|
3976
|
+
return (0, common_js_1.rfloat)(this, endian);
|
|
3977
3977
|
}
|
|
3978
3978
|
/**
|
|
3979
3979
|
* Write float
|
|
@@ -4027,7 +4027,7 @@ class biwriter {
|
|
|
4027
4027
|
* @param {string} endian - ``big`` or ``little`
|
|
4028
4028
|
*/
|
|
4029
4029
|
writeInt64(value, unsigned, endian) {
|
|
4030
|
-
return (0,
|
|
4030
|
+
return (0, common_js_1.wint64)(this, value, unsigned, endian);
|
|
4031
4031
|
}
|
|
4032
4032
|
/**
|
|
4033
4033
|
* Read signed 64 bit integer
|
|
@@ -4036,7 +4036,7 @@ class biwriter {
|
|
|
4036
4036
|
* @returns number
|
|
4037
4037
|
*/
|
|
4038
4038
|
readInt64(unsigned, endian) {
|
|
4039
|
-
return (0,
|
|
4039
|
+
return (0, common_js_1.rint64)(this, unsigned, endian);
|
|
4040
4040
|
}
|
|
4041
4041
|
/**
|
|
4042
4042
|
* Write 64 bit integer
|
|
@@ -4243,7 +4243,7 @@ class biwriter {
|
|
|
4243
4243
|
* @param {string} endian - ``big`` or ``little`
|
|
4244
4244
|
*/
|
|
4245
4245
|
writeDoubleFloat(value, endian) {
|
|
4246
|
-
return (0,
|
|
4246
|
+
return (0, common_js_1.wdfloat)(this, value, endian);
|
|
4247
4247
|
}
|
|
4248
4248
|
/**
|
|
4249
4249
|
* Read double float
|
|
@@ -4252,7 +4252,7 @@ class biwriter {
|
|
|
4252
4252
|
* @returns number
|
|
4253
4253
|
*/
|
|
4254
4254
|
readDoubleFloat(endian) {
|
|
4255
|
-
return (0,
|
|
4255
|
+
return (0, common_js_1.rdfloat)(this, endian);
|
|
4256
4256
|
}
|
|
4257
4257
|
/**
|
|
4258
4258
|
* Writes double float
|
|
@@ -4341,7 +4341,7 @@ class biwriter {
|
|
|
4341
4341
|
* ```
|
|
4342
4342
|
*/
|
|
4343
4343
|
writeString(string, options) {
|
|
4344
|
-
return (0,
|
|
4344
|
+
return (0, common_js_1.wstring)(this, string, options);
|
|
4345
4345
|
}
|
|
4346
4346
|
/**
|
|
4347
4347
|
* Reads string, use options object for different types
|
|
@@ -4361,7 +4361,7 @@ class biwriter {
|
|
|
4361
4361
|
* @return string
|
|
4362
4362
|
*/
|
|
4363
4363
|
readString(options) {
|
|
4364
|
-
return (0,
|
|
4364
|
+
return (0, common_js_1.rstring)(this, options);
|
|
4365
4365
|
}
|
|
4366
4366
|
/**
|
|
4367
4367
|
* Writes string, use options object for different types
|