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/dist/common.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export type endian = "little" | "big";
|
|
3
|
-
export type BigValue = number | bigint;
|
|
4
|
-
export type BiOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* Byte offset to start writer, default is 0
|
|
7
|
-
*/
|
|
8
|
-
byteOffset?: number;
|
|
9
|
-
/**
|
|
10
|
-
* Byte offset to start writer, default is 0
|
|
11
|
-
*/
|
|
12
|
-
bitOffset?: number;
|
|
13
|
-
/**
|
|
14
|
-
* Endianness ``big`` or ``little`` (default little)
|
|
15
|
-
*/
|
|
16
|
-
endianness?: endian;
|
|
17
|
-
/**
|
|
18
|
-
* Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
19
|
-
*/
|
|
20
|
-
strict?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Amount of data to add when extending the buffer array when strict mode is false. Note: Changes login in ``.get`` and ``.return``.
|
|
23
|
-
*/
|
|
24
|
-
extendBufferSize?: number;
|
|
25
|
-
};
|
|
26
|
-
export declare function isBuffer(obj: Buffer | Uint8Array): boolean;
|
|
27
|
-
export declare function arraybuffcheck(obj: Buffer | Uint8Array): boolean;
|
|
28
|
-
export type hexdumpOptions = {
|
|
29
|
-
/**
|
|
30
|
-
* number of bytes to log, default ``192`` or end of data
|
|
31
|
-
*/
|
|
32
|
-
length?: number;
|
|
33
|
-
/**
|
|
34
|
-
* byte to start dump (default ``0``)
|
|
35
|
-
*/
|
|
36
|
-
startByte?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Supress unicode character preview for even columns.
|
|
39
|
-
*/
|
|
40
|
-
supressUnicode?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Returns the hex dump string instead of logging it.
|
|
43
|
-
*/
|
|
44
|
-
returnString?: boolean;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Creates hex dump string. Will console log or return string if set in options.
|
|
48
|
-
*
|
|
49
|
-
* @param {Uint8Array|Buffer} src - Uint8Array or Buffer
|
|
50
|
-
* @param {hexdumpOptions?} options - hex dump options
|
|
51
|
-
* @param {number?} options.length - number of bytes to log, default ``192`` or end of data
|
|
52
|
-
* @param {number?} options.startByte - byte to start dump (default ``0``)
|
|
53
|
-
* @param {boolean?} options.supressUnicode - Supress unicode character preview for even columns.
|
|
54
|
-
* @param {boolean?} options.returnString - Returns the hex dump string instead of logging it.
|
|
55
|
-
*/
|
|
56
|
-
export declare function hexdump(src: Uint8Array | Buffer, options?: hexdumpOptions): void | string;
|
|
57
|
-
export declare function _hexDump(data: Buffer | Uint8Array, options: hexdumpOptions, start: number, end: number): string;
|
|
58
|
-
export type stringOptions = {
|
|
59
|
-
/**
|
|
60
|
-
* for fixed length, non-terminate value utf strings
|
|
61
|
-
*/
|
|
62
|
-
length?: number;
|
|
63
|
-
/**
|
|
64
|
-
* utf-8, utf-16, pascal or wide-pascal
|
|
65
|
-
*/
|
|
66
|
-
stringType?: "utf-8" | "utf-16" | "pascal" | "wide-pascal";
|
|
67
|
-
/**
|
|
68
|
-
* only with stringType: "utf"
|
|
69
|
-
*/
|
|
70
|
-
terminateValue?: number;
|
|
71
|
-
/**
|
|
72
|
-
* for pascal strings. 1, 2 or 4 byte length read size
|
|
73
|
-
*/
|
|
74
|
-
lengthReadSize?: 1 | 2 | 4;
|
|
75
|
-
/**
|
|
76
|
-
* for pascal strings. 1, 2 or 4 byte length write size
|
|
77
|
-
*/
|
|
78
|
-
lengthWriteSize?: 1 | 2 | 4;
|
|
79
|
-
/**
|
|
80
|
-
* removes 0x00 characters
|
|
81
|
-
*/
|
|
82
|
-
stripNull?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* TextEncoder accepted types
|
|
85
|
-
*/
|
|
86
|
-
encoding?: string;
|
|
87
|
-
/**
|
|
88
|
-
* for wide-pascal and utf-16
|
|
89
|
-
*/
|
|
90
|
-
endian?: "big" | "little";
|
|
91
|
-
};
|