bireader 3.1.5 → 3.1.7

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/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
- };