bireader 3.1.4 → 3.1.6
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 +21 -8
- package/dist/index.browser.d.ts +65 -41
- package/dist/index.browser.js +53 -23
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.d.ts +105 -77
- package/dist/index.cjs.js +63 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +105 -77
- package/dist/index.esm.d.ts +105 -77
- package/dist/index.esm.js +63 -23
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -8
- package/dist/BiReader.d.ts +0 -339
- package/dist/BiReaderStream.d.ts +0 -340
- package/dist/BiWriter.d.ts +0 -344
- package/dist/BiWriterStream.d.ts +0 -347
- package/dist/aliases/BinaryAliasReader.d.ts +0 -4678
- package/dist/aliases/BinaryAliasWriter.d.ts +0 -4648
- package/dist/common.d.ts +0 -91
- package/dist/core/BiBase.d.ts +0 -1328
- package/dist/core/BiBaseStream.d.ts +0 -1363
- package/dist/indexBrowser.d.ts +0 -19
- package/dist/indexImport.d.ts +0 -21
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BiReader / BiWriter
|
|
2
2
|
|
|
3
|
-
A feature rich binary reader ***and writer*** that keeps track of your position to quickly create file structures. Includes shared naming conventions, programmable inputs and advanced math for easy data conversions on low level parsing. Accepts `Uint8Array` or
|
|
3
|
+
A feature rich binary reader ***and writer*** that keeps track of your position to quickly create file structures. Includes shared naming conventions, programmable inputs and advanced math for easy data conversions on low level parsing. Accepts `Uint8Array`, `Buffer` or a ``filePath`` with [Streams](#bistreams).
|
|
4
4
|
|
|
5
5
|
Supported data types:
|
|
6
6
|
|
|
@@ -18,7 +18,8 @@ Supported data types:
|
|
|
18
18
|
|
|
19
19
|
### v3
|
|
20
20
|
* Added Browser, Node CommonJS and Node ESM modules.
|
|
21
|
-
* Added new ``BiReaderStream`` and ``BiWriterStream``
|
|
21
|
+
* Added new ``BiReaderStream`` and ``BiWriterStream`` (Node only) that works without loading the whole file into memory. See [documention](#bistreams) for how to use.
|
|
22
|
+
* Added ``.deleteFile()`` and ``.renameFile(filePath)``.
|
|
22
23
|
* Added setter ``.strSettings`` for use with ``.str`` for easier coding.
|
|
23
24
|
* Added better options for extending array buffer when writing data with ``extendBufferSize``.
|
|
24
25
|
* Consolidated all options argument into single object when creating class.
|
|
@@ -27,6 +28,7 @@ Supported data types:
|
|
|
27
28
|
|
|
28
29
|
### v2
|
|
29
30
|
* Created new ``BiReader`` and ``BiWriter`` classes with *get* and *set* functions for easier coding.
|
|
31
|
+
* Marked ``bireader`` and ``biwriter`` as deprecated. Set to be removed next update.
|
|
30
32
|
|
|
31
33
|
### v1
|
|
32
34
|
* Included math functions and value searches.
|
|
@@ -36,7 +38,7 @@ Supported data types:
|
|
|
36
38
|
|
|
37
39
|
```npm install bireader```
|
|
38
40
|
|
|
39
|
-
Provides both CommonJS and ES modules for
|
|
41
|
+
Provides both CommonJS and ES modules for Node and Browser.
|
|
40
42
|
|
|
41
43
|
### Example
|
|
42
44
|
|
|
@@ -51,7 +53,7 @@ import {BiReader, BiWriter} from 'bireader';
|
|
|
51
53
|
function parse_webp(data){
|
|
52
54
|
const br = new BiReader(data);
|
|
53
55
|
br.strSettings = {length: 4};
|
|
54
|
-
br.hexdump({
|
|
56
|
+
br.hexdump({suppressUnicode:true}); // console.log data as hex
|
|
55
57
|
|
|
56
58
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
|
|
57
59
|
// 00000 52 49 46 46 98 3a 00 00 57 45 42 50 56 50 38 58 RIFF.:..WEBPVP8X
|
|
@@ -426,8 +428,8 @@ Common functions for setup, movement, manipulation and math shared by both.
|
|
|
426
428
|
</tr>
|
|
427
429
|
<tr>
|
|
428
430
|
<td>Name</td>
|
|
429
|
-
<td>hexdump({length, startByte,
|
|
430
|
-
<td align="center">Length of dump in bytes (default 192), byte position to start the dump (default current byte position),
|
|
431
|
+
<td>hexdump({length, startByte, suppressUnicode})</td>
|
|
432
|
+
<td align="center">Length of dump in bytes (default 192), byte position to start the dump (default current byte position), Suppress unicode character preview for cleaner columns (default false)</td>
|
|
431
433
|
<td >Console logs data. Will trigger on error unless turned off (see below)</td>
|
|
432
434
|
</tr>
|
|
433
435
|
<tr>
|
|
@@ -743,7 +745,7 @@ Common functions for setup, movement, manipulation and math shared by both.
|
|
|
743
745
|
|
|
744
746
|
## BiStreams
|
|
745
747
|
|
|
746
|
-
With 3.1 you can now use ``BiReaderStream`` and ``BiWriterStream``
|
|
748
|
+
With 3.1 you can now use ``BiReaderStream`` and ``BiWriterStream`` (Node only) designed for larger files (or if you don't want or need the whole file loaded to memory all at once).
|
|
747
749
|
|
|
748
750
|
<table>
|
|
749
751
|
<thead>
|
|
@@ -787,7 +789,18 @@ With 3.1 you can now use ``BiReaderStream`` and ``BiWriterStream`` in Node for l
|
|
|
787
789
|
<td align="center"><b>True if you want to switch to writing in BiReaderStream.</td>
|
|
788
790
|
<td>Note: This changes reader to write mode. Allows file to be expanded in size as well.</td>
|
|
789
791
|
</tr>
|
|
790
|
-
|
|
792
|
+
<tr>
|
|
793
|
+
<td>Name</td>
|
|
794
|
+
<td>renameFile(<b>newFilePath</b>)
|
|
795
|
+
<td align="center"><b>Full path to file to rename.</td>
|
|
796
|
+
<td>Renames the file on the file system, keeps read / write position.<br/><br/><b>Note: This is permanent.</b></td>
|
|
797
|
+
</tr>
|
|
798
|
+
<tr>
|
|
799
|
+
<td>Name</td>
|
|
800
|
+
<td>deleteFile()
|
|
801
|
+
<td align="center"><b>none</td>
|
|
802
|
+
<td>Unlinks the file from the file system.<br/><br/><b>Note: This is permanent, it doesn't send the file to the recycling bin for recovery.</b></td>
|
|
803
|
+
</tr>
|
|
791
804
|
</tbody>
|
|
792
805
|
</table>
|
|
793
806
|
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ type hexdumpOptions = {
|
|
|
33
33
|
*/
|
|
34
34
|
startByte?: number;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Suppress unicode character preview for even columns.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
suppressUnicode?: boolean;
|
|
39
39
|
/**
|
|
40
40
|
* Returns the hex dump string instead of logging it.
|
|
41
41
|
*/
|
|
@@ -48,7 +48,7 @@ type hexdumpOptions = {
|
|
|
48
48
|
* @param {hexdumpOptions?} options - hex dump options
|
|
49
49
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
50
50
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
51
|
-
* @param {boolean?} options.
|
|
51
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
52
52
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
53
53
|
*/
|
|
54
54
|
declare function hexdump(src: Uint8Array | Buffer, options?: hexdumpOptions): void | string;
|
|
@@ -173,6 +173,14 @@ declare class BiBase {
|
|
|
173
173
|
* Dummy function, not needed on Non-Stream
|
|
174
174
|
*/
|
|
175
175
|
write(start: number, data: Buffer, consume?: boolean): number;
|
|
176
|
+
/**
|
|
177
|
+
* Dummy function, not needed on Non-Stream
|
|
178
|
+
*/
|
|
179
|
+
renameFile(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Dummy function, not needed on Non-Stream
|
|
182
|
+
*/
|
|
183
|
+
deleteFile(): void;
|
|
176
184
|
/**
|
|
177
185
|
* Dummy function, not needed on Non-Stream
|
|
178
186
|
*/
|
|
@@ -395,7 +403,7 @@ declare class BiBase {
|
|
|
395
403
|
* @param {hexdumpOptions?} options - hex dump options
|
|
396
404
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
397
405
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
398
|
-
* @param {boolean?} options.
|
|
406
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
399
407
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
400
408
|
*/
|
|
401
409
|
hexdump(options?: hexdumpOptions): void | string;
|
|
@@ -6028,111 +6036,111 @@ interface BinaryAliasWriter extends BiBase {
|
|
|
6028
6036
|
/**
|
|
6029
6037
|
* Write 64 bit integer.
|
|
6030
6038
|
*
|
|
6031
|
-
* @param {
|
|
6039
|
+
* @param {BigValue} value - value as int
|
|
6032
6040
|
*/
|
|
6033
|
-
set int64(value:
|
|
6041
|
+
set int64(value: BigValue);
|
|
6034
6042
|
/**
|
|
6035
6043
|
* Write 64 bit integer.
|
|
6036
6044
|
*
|
|
6037
|
-
* @param {
|
|
6045
|
+
* @param {BigValue} value - value as int
|
|
6038
6046
|
*/
|
|
6039
|
-
set quad(value:
|
|
6047
|
+
set quad(value: BigValue);
|
|
6040
6048
|
/**
|
|
6041
6049
|
* Write 64 bit integer.
|
|
6042
6050
|
*
|
|
6043
|
-
* @param {
|
|
6051
|
+
* @param {BigValue} value - value as int
|
|
6044
6052
|
*/
|
|
6045
|
-
set bigint(value:
|
|
6053
|
+
set bigint(value: BigValue);
|
|
6046
6054
|
/**
|
|
6047
6055
|
* Write unsigned 64 bit integer.
|
|
6048
6056
|
*
|
|
6049
|
-
* @param {
|
|
6057
|
+
* @param {BigValue} value - value as int
|
|
6050
6058
|
*/
|
|
6051
|
-
set uint64(value:
|
|
6059
|
+
set uint64(value: BigValue);
|
|
6052
6060
|
/**
|
|
6053
6061
|
* Write unsigned 64 bit integer.
|
|
6054
6062
|
*
|
|
6055
|
-
* @param {
|
|
6063
|
+
* @param {BigValue} value - value as int
|
|
6056
6064
|
*/
|
|
6057
|
-
set ubigint(value:
|
|
6065
|
+
set ubigint(value: BigValue);
|
|
6058
6066
|
/**
|
|
6059
6067
|
* Write unsigned 64 bit integer.
|
|
6060
6068
|
*
|
|
6061
|
-
* @param {
|
|
6069
|
+
* @param {BigValue} value - value as int
|
|
6062
6070
|
*/
|
|
6063
|
-
set uquad(value:
|
|
6071
|
+
set uquad(value: BigValue);
|
|
6064
6072
|
/**
|
|
6065
6073
|
* Write signed 64 bit integer.
|
|
6066
6074
|
*
|
|
6067
|
-
* @param {
|
|
6075
|
+
* @param {BigValue} value - value as int
|
|
6068
6076
|
*/
|
|
6069
|
-
set int64le(value:
|
|
6077
|
+
set int64le(value: BigValue);
|
|
6070
6078
|
/**
|
|
6071
6079
|
* Write signed 64 bit integer.
|
|
6072
6080
|
*
|
|
6073
|
-
* @param {
|
|
6081
|
+
* @param {BigValue} value - value as int
|
|
6074
6082
|
*/
|
|
6075
|
-
set bigintle(value:
|
|
6083
|
+
set bigintle(value: BigValue);
|
|
6076
6084
|
/**
|
|
6077
6085
|
* Write signed 64 bit integer.
|
|
6078
6086
|
*
|
|
6079
|
-
* @param {
|
|
6087
|
+
* @param {BigValue} value - value as int
|
|
6080
6088
|
*/
|
|
6081
|
-
set quadle(value:
|
|
6089
|
+
set quadle(value: BigValue);
|
|
6082
6090
|
/**
|
|
6083
6091
|
* Write unsigned 64 bit integer.
|
|
6084
6092
|
*
|
|
6085
|
-
* @param {
|
|
6093
|
+
* @param {BigValue} value - value as int
|
|
6086
6094
|
*/
|
|
6087
|
-
set uint64le(value:
|
|
6095
|
+
set uint64le(value: BigValue);
|
|
6088
6096
|
/**
|
|
6089
6097
|
* Write unsigned 64 bit integer.
|
|
6090
6098
|
*
|
|
6091
|
-
* @param {
|
|
6099
|
+
* @param {BigValue} value - value as int
|
|
6092
6100
|
*/
|
|
6093
|
-
set ubigintle(value:
|
|
6101
|
+
set ubigintle(value: BigValue);
|
|
6094
6102
|
/**
|
|
6095
6103
|
* Write unsigned 64 bit integer.
|
|
6096
6104
|
*
|
|
6097
|
-
* @param {
|
|
6105
|
+
* @param {BigValue} value - value as int
|
|
6098
6106
|
*/
|
|
6099
|
-
set uquadle(value:
|
|
6107
|
+
set uquadle(value: BigValue);
|
|
6100
6108
|
/**
|
|
6101
6109
|
* Write signed 64 bit integer.
|
|
6102
6110
|
*
|
|
6103
|
-
* @param {
|
|
6111
|
+
* @param {BigValue} value - value as int
|
|
6104
6112
|
*/
|
|
6105
|
-
set int64be(value:
|
|
6113
|
+
set int64be(value: BigValue);
|
|
6106
6114
|
/**
|
|
6107
6115
|
* Write signed 64 bit integer.
|
|
6108
6116
|
*
|
|
6109
|
-
* @param {
|
|
6117
|
+
* @param {BigValue} value - value as int
|
|
6110
6118
|
*/
|
|
6111
|
-
set bigintbe(value:
|
|
6119
|
+
set bigintbe(value: BigValue);
|
|
6112
6120
|
/**
|
|
6113
6121
|
* Write signed 64 bit integer.
|
|
6114
6122
|
*
|
|
6115
|
-
* @param {
|
|
6123
|
+
* @param {BigValue} value - value as int
|
|
6116
6124
|
*/
|
|
6117
|
-
set quadbe(value:
|
|
6125
|
+
set quadbe(value: BigValue);
|
|
6118
6126
|
/**
|
|
6119
6127
|
* Write unsigned 64 bit integer.
|
|
6120
6128
|
*
|
|
6121
|
-
* @param {
|
|
6129
|
+
* @param {BigValue} value - value as int
|
|
6122
6130
|
*/
|
|
6123
|
-
set uint64be(value:
|
|
6131
|
+
set uint64be(value: BigValue);
|
|
6124
6132
|
/**
|
|
6125
6133
|
* Write unsigned 64 bit integer.
|
|
6126
6134
|
*
|
|
6127
|
-
* @param {
|
|
6135
|
+
* @param {BigValue} value - value as int
|
|
6128
6136
|
*/
|
|
6129
|
-
set ubigintbe(value:
|
|
6137
|
+
set ubigintbe(value: BigValue);
|
|
6130
6138
|
/**
|
|
6131
6139
|
* Write unsigned 64 bit integer.
|
|
6132
6140
|
*
|
|
6133
|
-
* @param {
|
|
6141
|
+
* @param {BigValue} value - value as int
|
|
6134
6142
|
*/
|
|
6135
|
-
set uquadbe(value:
|
|
6143
|
+
set uquadbe(value: BigValue);
|
|
6136
6144
|
/**
|
|
6137
6145
|
* Writes double float.
|
|
6138
6146
|
*
|
|
@@ -6750,6 +6758,22 @@ declare class BiWriter extends BiWriterBase implements BinaryAliasWriter {
|
|
|
6750
6758
|
wpstring4be(string: string): void;
|
|
6751
6759
|
}
|
|
6752
6760
|
|
|
6761
|
+
/**
|
|
6762
|
+
* Isn't usable in browser.
|
|
6763
|
+
* @since 3.0
|
|
6764
|
+
* @deprecated Use ``BiReader`` instead.
|
|
6765
|
+
*/
|
|
6766
|
+
declare class BiReaderStream {
|
|
6767
|
+
constructor();
|
|
6768
|
+
}
|
|
6769
|
+
/**
|
|
6770
|
+
* Isn't usable in browser.
|
|
6771
|
+
* @since 3.0
|
|
6772
|
+
* @deprecated Use ``BiWriter`` instead.
|
|
6773
|
+
*/
|
|
6774
|
+
declare class BiWriterStream {
|
|
6775
|
+
constructor();
|
|
6776
|
+
}
|
|
6753
6777
|
/**
|
|
6754
6778
|
* Not in use anymore.
|
|
6755
6779
|
* @since 3.0
|
|
@@ -6767,4 +6791,4 @@ declare class biwriter {
|
|
|
6767
6791
|
constructor();
|
|
6768
6792
|
}
|
|
6769
6793
|
|
|
6770
|
-
export { BiReader, BiWriter, bireader, biwriter, hexdump };
|
|
6794
|
+
export { BiReader, BiReaderStream, BiWriter, BiWriterStream, bireader, biwriter, hexdump };
|
package/dist/index.browser.js
CHANGED
|
@@ -14,7 +14,7 @@ function arraybuffcheck(obj) {
|
|
|
14
14
|
* @param {hexdumpOptions?} options - hex dump options
|
|
15
15
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
16
16
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
17
|
-
* @param {boolean?} options.
|
|
17
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
18
18
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
19
19
|
*/
|
|
20
20
|
function hexdump(src, options = {}) {
|
|
@@ -56,7 +56,7 @@ function _hexDump(data, options = {}, start, end) {
|
|
|
56
56
|
value = value >>> 0;
|
|
57
57
|
return value;
|
|
58
58
|
}
|
|
59
|
-
var
|
|
59
|
+
var suppressUnicode = options && options.suppressUnicode || false;
|
|
60
60
|
const rows = [];
|
|
61
61
|
var header = " 0 1 2 3 4 5 6 7 8 9 A B C D E F ";
|
|
62
62
|
var ending = "0123456789ABCDEF";
|
|
@@ -80,7 +80,7 @@ function _hexDump(data, options = {}, start, end) {
|
|
|
80
80
|
// Convert the byte to a character and add it to the result
|
|
81
81
|
result += String.fromCharCode(byte);
|
|
82
82
|
}
|
|
83
|
-
else if (
|
|
83
|
+
else if (suppressUnicode) {
|
|
84
84
|
result += '.';
|
|
85
85
|
}
|
|
86
86
|
else if (hex_check(byte, 1) == 0) {
|
|
@@ -1810,6 +1810,16 @@ class BiBase {
|
|
|
1810
1810
|
this.insert(data, consume, start);
|
|
1811
1811
|
return data.length;
|
|
1812
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Dummy function, not needed on Non-Stream
|
|
1815
|
+
*/
|
|
1816
|
+
renameFile() {
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Dummy function, not needed on Non-Stream
|
|
1820
|
+
*/
|
|
1821
|
+
deleteFile() {
|
|
1822
|
+
}
|
|
1813
1823
|
/**
|
|
1814
1824
|
* Dummy function, not needed on Non-Stream
|
|
1815
1825
|
*/
|
|
@@ -2132,7 +2142,7 @@ class BiBase {
|
|
|
2132
2142
|
* @param {hexdumpOptions?} options - hex dump options
|
|
2133
2143
|
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
2134
2144
|
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
2135
|
-
* @param {boolean?} options.
|
|
2145
|
+
* @param {boolean?} options.suppressUnicode - Suppress unicode character preview for even columns.
|
|
2136
2146
|
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
2137
2147
|
*/
|
|
2138
2148
|
hexdump(options = {}) {
|
|
@@ -10056,7 +10066,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10056
10066
|
/**
|
|
10057
10067
|
* Write 64 bit integer.
|
|
10058
10068
|
*
|
|
10059
|
-
* @param {
|
|
10069
|
+
* @param {BigValue} value - value as int
|
|
10060
10070
|
*/
|
|
10061
10071
|
set int64(value) {
|
|
10062
10072
|
this.writeInt64(value);
|
|
@@ -10064,7 +10074,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10064
10074
|
/**
|
|
10065
10075
|
* Write 64 bit integer.
|
|
10066
10076
|
*
|
|
10067
|
-
* @param {
|
|
10077
|
+
* @param {BigValue} value - value as int
|
|
10068
10078
|
*/
|
|
10069
10079
|
set quad(value) {
|
|
10070
10080
|
this.writeInt64(value);
|
|
@@ -10072,7 +10082,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10072
10082
|
/**
|
|
10073
10083
|
* Write 64 bit integer.
|
|
10074
10084
|
*
|
|
10075
|
-
* @param {
|
|
10085
|
+
* @param {BigValue} value - value as int
|
|
10076
10086
|
*/
|
|
10077
10087
|
set bigint(value) {
|
|
10078
10088
|
this.writeInt64(value);
|
|
@@ -10080,7 +10090,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10080
10090
|
/**
|
|
10081
10091
|
* Write unsigned 64 bit integer.
|
|
10082
10092
|
*
|
|
10083
|
-
* @param {
|
|
10093
|
+
* @param {BigValue} value - value as int
|
|
10084
10094
|
*/
|
|
10085
10095
|
set uint64(value) {
|
|
10086
10096
|
this.writeInt64(value, true);
|
|
@@ -10088,7 +10098,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10088
10098
|
/**
|
|
10089
10099
|
* Write unsigned 64 bit integer.
|
|
10090
10100
|
*
|
|
10091
|
-
* @param {
|
|
10101
|
+
* @param {BigValue} value - value as int
|
|
10092
10102
|
*/
|
|
10093
10103
|
set ubigint(value) {
|
|
10094
10104
|
this.writeInt64(value, true);
|
|
@@ -10096,7 +10106,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10096
10106
|
/**
|
|
10097
10107
|
* Write unsigned 64 bit integer.
|
|
10098
10108
|
*
|
|
10099
|
-
* @param {
|
|
10109
|
+
* @param {BigValue} value - value as int
|
|
10100
10110
|
*/
|
|
10101
10111
|
set uquad(value) {
|
|
10102
10112
|
this.writeInt64(value, true);
|
|
@@ -10104,7 +10114,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10104
10114
|
/**
|
|
10105
10115
|
* Write signed 64 bit integer.
|
|
10106
10116
|
*
|
|
10107
|
-
* @param {
|
|
10117
|
+
* @param {BigValue} value - value as int
|
|
10108
10118
|
*/
|
|
10109
10119
|
set int64le(value) {
|
|
10110
10120
|
this.writeInt64(value, false, "little");
|
|
@@ -10112,7 +10122,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10112
10122
|
/**
|
|
10113
10123
|
* Write signed 64 bit integer.
|
|
10114
10124
|
*
|
|
10115
|
-
* @param {
|
|
10125
|
+
* @param {BigValue} value - value as int
|
|
10116
10126
|
*/
|
|
10117
10127
|
set bigintle(value) {
|
|
10118
10128
|
this.writeInt64(value, false, "little");
|
|
@@ -10120,7 +10130,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10120
10130
|
/**
|
|
10121
10131
|
* Write signed 64 bit integer.
|
|
10122
10132
|
*
|
|
10123
|
-
* @param {
|
|
10133
|
+
* @param {BigValue} value - value as int
|
|
10124
10134
|
*/
|
|
10125
10135
|
set quadle(value) {
|
|
10126
10136
|
this.writeInt64(value, false, "little");
|
|
@@ -10128,7 +10138,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10128
10138
|
/**
|
|
10129
10139
|
* Write unsigned 64 bit integer.
|
|
10130
10140
|
*
|
|
10131
|
-
* @param {
|
|
10141
|
+
* @param {BigValue} value - value as int
|
|
10132
10142
|
*/
|
|
10133
10143
|
set uint64le(value) {
|
|
10134
10144
|
this.writeInt64(value, true, "little");
|
|
@@ -10136,7 +10146,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10136
10146
|
/**
|
|
10137
10147
|
* Write unsigned 64 bit integer.
|
|
10138
10148
|
*
|
|
10139
|
-
* @param {
|
|
10149
|
+
* @param {BigValue} value - value as int
|
|
10140
10150
|
*/
|
|
10141
10151
|
set ubigintle(value) {
|
|
10142
10152
|
this.writeInt64(value, true, "little");
|
|
@@ -10144,7 +10154,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10144
10154
|
/**
|
|
10145
10155
|
* Write unsigned 64 bit integer.
|
|
10146
10156
|
*
|
|
10147
|
-
* @param {
|
|
10157
|
+
* @param {BigValue} value - value as int
|
|
10148
10158
|
*/
|
|
10149
10159
|
set uquadle(value) {
|
|
10150
10160
|
this.writeInt64(value, true, "little");
|
|
@@ -10152,7 +10162,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10152
10162
|
/**
|
|
10153
10163
|
* Write signed 64 bit integer.
|
|
10154
10164
|
*
|
|
10155
|
-
* @param {
|
|
10165
|
+
* @param {BigValue} value - value as int
|
|
10156
10166
|
*/
|
|
10157
10167
|
set int64be(value) {
|
|
10158
10168
|
this.writeInt64(value, false, "big");
|
|
@@ -10160,7 +10170,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10160
10170
|
/**
|
|
10161
10171
|
* Write signed 64 bit integer.
|
|
10162
10172
|
*
|
|
10163
|
-
* @param {
|
|
10173
|
+
* @param {BigValue} value - value as int
|
|
10164
10174
|
*/
|
|
10165
10175
|
set bigintbe(value) {
|
|
10166
10176
|
this.writeInt64(value, false, "big");
|
|
@@ -10168,7 +10178,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10168
10178
|
/**
|
|
10169
10179
|
* Write signed 64 bit integer.
|
|
10170
10180
|
*
|
|
10171
|
-
* @param {
|
|
10181
|
+
* @param {BigValue} value - value as int
|
|
10172
10182
|
*/
|
|
10173
10183
|
set quadbe(value) {
|
|
10174
10184
|
this.writeInt64(value, false, "big");
|
|
@@ -10176,7 +10186,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10176
10186
|
/**
|
|
10177
10187
|
* Write unsigned 64 bit integer.
|
|
10178
10188
|
*
|
|
10179
|
-
* @param {
|
|
10189
|
+
* @param {BigValue} value - value as int
|
|
10180
10190
|
*/
|
|
10181
10191
|
set uint64be(value) {
|
|
10182
10192
|
this.writeInt64(value, true, "big");
|
|
@@ -10184,7 +10194,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10184
10194
|
/**
|
|
10185
10195
|
* Write unsigned 64 bit integer.
|
|
10186
10196
|
*
|
|
10187
|
-
* @param {
|
|
10197
|
+
* @param {BigValue} value - value as int
|
|
10188
10198
|
*/
|
|
10189
10199
|
set ubigintbe(value) {
|
|
10190
10200
|
this.writeInt64(value, true, "big");
|
|
@@ -10192,7 +10202,7 @@ function applyBinaryAliasWriter(Base) {
|
|
|
10192
10202
|
/**
|
|
10193
10203
|
* Write unsigned 64 bit integer.
|
|
10194
10204
|
*
|
|
10195
|
-
* @param {
|
|
10205
|
+
* @param {BigValue} value - value as int
|
|
10196
10206
|
*/
|
|
10197
10207
|
set uquadbe(value) {
|
|
10198
10208
|
this.writeInt64(value, true, "big");
|
|
@@ -11582,6 +11592,26 @@ class BiWriter extends BiWriterBase {
|
|
|
11582
11592
|
}
|
|
11583
11593
|
}
|
|
11584
11594
|
|
|
11595
|
+
/**
|
|
11596
|
+
* Isn't usable in browser.
|
|
11597
|
+
* @since 3.0
|
|
11598
|
+
* @deprecated Use ``BiReader`` instead.
|
|
11599
|
+
*/
|
|
11600
|
+
class BiReaderStream {
|
|
11601
|
+
constructor() {
|
|
11602
|
+
throw new Error("BiReaderStream isn't usable in browser. Use BiReader instead.");
|
|
11603
|
+
}
|
|
11604
|
+
}
|
|
11605
|
+
/**
|
|
11606
|
+
* Isn't usable in browser.
|
|
11607
|
+
* @since 3.0
|
|
11608
|
+
* @deprecated Use ``BiWriter`` instead.
|
|
11609
|
+
*/
|
|
11610
|
+
class BiWriterStream {
|
|
11611
|
+
constructor() {
|
|
11612
|
+
throw new Error("BiReaderStream isn't usable in browser. Use BiReader instead.");
|
|
11613
|
+
}
|
|
11614
|
+
}
|
|
11585
11615
|
/**
|
|
11586
11616
|
* Not in use anymore.
|
|
11587
11617
|
* @since 3.0
|
|
@@ -11603,5 +11633,5 @@ class biwriter {
|
|
|
11603
11633
|
}
|
|
11604
11634
|
}
|
|
11605
11635
|
|
|
11606
|
-
export { BiReader, BiWriter, bireader, biwriter, hexdump };
|
|
11636
|
+
export { BiReader, BiReaderStream, BiWriter, BiWriterStream, bireader, biwriter, hexdump };
|
|
11607
11637
|
//# sourceMappingURL=index.browser.js.map
|