@hotlap.ai/telemetry 1.0.0 → 1.2.0

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/ibt.js CHANGED
@@ -1,298 +1,15 @@
1
1
  // @bun
2
2
  import {
3
- $parse
4
- } from "./index-k5bgtn4c.js";
5
- import {
6
- parseDiskSubHeader,
7
- parseHeader,
8
- parseVarHeaders,
9
- readString,
10
- readVarValue,
11
- readVarValueBatch
12
- } from "./binary-reader.js";
13
- import {
14
- DISK_SUB_HEADER_OFFSET
15
- } from "./constants.js";
16
-
17
- // src/ibt.ts
18
- class IBT {
19
- buffer = null;
20
- view = null;
21
- header = null;
22
- diskHeader = null;
23
- varHeaders = null;
24
- sessionInfoCache = new Map;
25
- rawSessionInfo = null;
26
- filePath = null;
27
- get fileName() {
28
- return this.filePath;
29
- }
30
- get varHeaderBufferTick() {
31
- return this.header?.varBuf[0]?.tickCount ?? null;
32
- }
33
- get varHeaderNames() {
34
- if (!this.varHeaders)
35
- return null;
36
- return Array.from(this.varHeaders.keys());
37
- }
38
- get recordCount() {
39
- return this.diskHeader?.sessionRecordCount ?? 0;
40
- }
41
- get sessionLapCount() {
42
- return this.diskHeader?.sessionLapCount ?? 0;
43
- }
44
- get sessionStartTime() {
45
- return this.diskHeader?.sessionStartTime ?? 0;
46
- }
47
- get sessionEndTime() {
48
- return this.diskHeader?.sessionEndTime ?? 0;
49
- }
50
- get tickRate() {
51
- return this.header?.tickRate ?? 60;
52
- }
53
- get bufLen() {
54
- return this.header?.bufLen ?? 0;
55
- }
56
- async open(filePath) {
57
- this.filePath = filePath;
58
- const file = Bun.file(filePath);
59
- const arrayBuffer = await file.arrayBuffer();
60
- this.buffer = new Uint8Array(arrayBuffer);
61
- this.view = new DataView(arrayBuffer);
62
- this.header = parseHeader(this.view);
63
- this.diskHeader = parseDiskSubHeader(this.view, DISK_SUB_HEADER_OFFSET);
64
- this.varHeaders = parseVarHeaders(this.view, this.buffer, this.header);
65
- this.sessionInfoCache.clear();
66
- this.rawSessionInfo = null;
67
- }
68
- openSync(filePath) {
69
- this.filePath = filePath;
70
- const file = Bun.file(filePath);
71
- const arrayBuffer = file.arrayBuffer();
72
- if (arrayBuffer instanceof Promise) {
73
- throw new Error("Sync file reading requires Bun.file().bytes() - use open() instead");
74
- }
75
- this.buffer = new Uint8Array(arrayBuffer);
76
- this.view = new DataView(arrayBuffer);
77
- this.header = parseHeader(this.view);
78
- this.diskHeader = parseDiskSubHeader(this.view, DISK_SUB_HEADER_OFFSET);
79
- this.varHeaders = parseVarHeaders(this.view, this.buffer, this.header);
80
- this.sessionInfoCache.clear();
81
- this.rawSessionInfo = null;
82
- }
83
- static async fromBuffer(buffer) {
84
- const ibt = new IBT;
85
- ibt.buffer = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
86
- ibt.view = new DataView(ibt.buffer.buffer, ibt.buffer.byteOffset, ibt.buffer.byteLength);
87
- ibt.header = parseHeader(ibt.view);
88
- ibt.diskHeader = parseDiskSubHeader(ibt.view, DISK_SUB_HEADER_OFFSET);
89
- ibt.varHeaders = parseVarHeaders(ibt.view, ibt.buffer, ibt.header);
90
- return ibt;
91
- }
92
- close() {
93
- this.buffer = null;
94
- this.view = null;
95
- this.header = null;
96
- this.diskHeader = null;
97
- this.varHeaders = null;
98
- this.sessionInfoCache.clear();
99
- this.rawSessionInfo = null;
100
- this.filePath = null;
101
- }
102
- getVarHeader(name) {
103
- return this.varHeaders?.get(name);
104
- }
105
- get(index, key) {
106
- if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
107
- return null;
108
- if (index < 0 || index >= this.diskHeader.sessionRecordCount)
109
- return null;
110
- const varHeader = this.varHeaders.get(key);
111
- if (!varHeader)
112
- return null;
113
- const varBuf = this.header.varBuf[0];
114
- if (!varBuf)
115
- return null;
116
- const varOffset = varHeader.offset + varBuf.bufOffset + index * this.header.bufLen;
117
- return readVarValue(this.view, varOffset, varHeader.type, varHeader.count);
118
- }
119
- getAll(key) {
120
- if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
121
- return null;
122
- const varHeader = this.varHeaders.get(key);
123
- if (!varHeader)
124
- return null;
125
- const varBuf = this.header.varBuf[0];
126
- if (!varBuf)
127
- return null;
128
- const baseOffset = varBuf.bufOffset;
129
- const bufLen = this.header.bufLen;
130
- const recordCount = this.diskHeader.sessionRecordCount;
131
- const varOffset = varHeader.offset;
132
- const isArray = varHeader.count > 1;
133
- const results = new Array(recordCount);
134
- for (let i = 0;i < recordCount; i++) {
135
- const offset = baseOffset + i * bufLen + varOffset;
136
- results[i] = readVarValue(this.view, offset, varHeader.type, varHeader.count);
137
- }
138
- return results;
139
- }
140
- getAllTyped(key) {
141
- if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
142
- return null;
143
- const varHeader = this.varHeaders.get(key);
144
- if (!varHeader || varHeader.count !== 1)
145
- return null;
146
- const varBuf = this.header.varBuf[0];
147
- if (!varBuf)
148
- return null;
149
- const baseOffset = varBuf.bufOffset;
150
- const bufLen = this.header.bufLen;
151
- const recordCount = this.diskHeader.sessionRecordCount;
152
- const varOffset = varHeader.offset;
153
- let output;
154
- switch (varHeader.type) {
155
- case 4:
156
- output = new Float32Array(recordCount);
157
- break;
158
- case 5:
159
- output = new Float64Array(recordCount);
160
- break;
161
- case 2:
162
- output = new Int32Array(recordCount);
163
- break;
164
- case 3:
165
- output = new Uint32Array(recordCount);
166
- break;
167
- default:
168
- return null;
169
- }
170
- readVarValueBatch(this.view, baseOffset, varOffset, varHeader.type, bufLen, recordCount, output);
171
- return output;
172
- }
173
- getAllMultiple(keys) {
174
- const results = new Map;
175
- if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
176
- return results;
177
- const varBuf = this.header.varBuf[0];
178
- if (!varBuf)
179
- return results;
180
- const baseOffset = varBuf.bufOffset;
181
- const bufLen = this.header.bufLen;
182
- const recordCount = this.diskHeader.sessionRecordCount;
183
- const varInfos = [];
184
- for (const key of keys) {
185
- const varHeader = this.varHeaders.get(key);
186
- if (varHeader) {
187
- const data = new Array(recordCount);
188
- varInfos.push({ key, varHeader, data });
189
- results.set(key, data);
190
- }
191
- }
192
- for (let i = 0;i < recordCount; i++) {
193
- const recordOffset = baseOffset + i * bufLen;
194
- for (const { varHeader, data } of varInfos) {
195
- const offset = recordOffset + varHeader.offset;
196
- data[i] = readVarValue(this.view, offset, varHeader.type, varHeader.count);
197
- }
198
- }
199
- return results;
200
- }
201
- *iterate(keys) {
202
- if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
203
- return;
204
- const varBuf = this.header.varBuf[0];
205
- if (!varBuf)
206
- return;
207
- const baseOffset = varBuf.bufOffset;
208
- const bufLen = this.header.bufLen;
209
- const recordCount = this.diskHeader.sessionRecordCount;
210
- const varInfos = [];
211
- for (const key of keys) {
212
- const varHeader = this.varHeaders.get(key);
213
- if (varHeader) {
214
- varInfos.push({ key, varHeader });
215
- }
216
- }
217
- for (let i = 0;i < recordCount; i++) {
218
- const recordOffset = baseOffset + i * bufLen;
219
- const record = new Map;
220
- for (const { key, varHeader } of varInfos) {
221
- const offset = recordOffset + varHeader.offset;
222
- record.set(key, readVarValue(this.view, offset, varHeader.type, varHeader.count));
223
- }
224
- yield record;
225
- }
226
- }
227
- getRawSessionInfo() {
228
- if (!this.header || !this.buffer)
229
- return null;
230
- if (this.rawSessionInfo === null) {
231
- const start = this.header.sessionInfoOffset;
232
- const len = this.header.sessionInfoLen;
233
- this.rawSessionInfo = readString(this.buffer, start, len);
234
- }
235
- return this.rawSessionInfo;
236
- }
237
- getSessionInfo(key) {
238
- const raw = this.getRawSessionInfo();
239
- if (!raw)
240
- return null;
241
- if (!key) {
242
- if (!this.sessionInfoCache.has("__full__")) {
243
- try {
244
- const cleaned = this.cleanYaml(raw);
245
- this.sessionInfoCache.set("__full__", $parse(cleaned));
246
- } catch {
247
- return null;
248
- }
249
- }
250
- return this.sessionInfoCache.get("__full__");
251
- }
252
- if (this.sessionInfoCache.has(key)) {
253
- return this.sessionInfoCache.get(key);
254
- }
255
- const sectionMatch = raw.match(new RegExp(`
256
- ${key}:
257
- ([\\s\\S]*?)(?=
258
-
259
- |$)`));
260
- if (!sectionMatch)
261
- return null;
262
- try {
263
- const sectionYaml = `${key}:
264
- ${sectionMatch[1]}`;
265
- const cleaned = this.cleanYaml(sectionYaml);
266
- const parsed = $parse(cleaned);
267
- const result = parsed?.[key] ?? null;
268
- this.sessionInfoCache.set(key, result);
269
- return result;
270
- } catch {
271
- return null;
272
- }
273
- }
274
- cleanYaml(yaml) {
275
- let cleaned = yaml.replace(/[\x81\x8D\x8F\x90\x9D]/g, " ").replace(/[^\x09\x0A\x0D\x20-\x7E\xA0-\xFF]/g, "");
276
- cleaned = cleaned.replace(/((?:DriverSetupName|UserName|TeamName|AbbrevName|Initials): )(.*)/g, (_, prefix, value) => {
277
- const escaped = value.replace(/["\\]/g, "\\$&");
278
- return `${prefix}"${escaped}"`;
279
- });
280
- cleaned = cleaned.replace(/(\w+: )(,.*)/g, '$1"$2"');
281
- return cleaned;
282
- }
283
- }
284
- async function parseIbt(filePath) {
285
- const ibt = new IBT;
286
- await ibt.open(filePath);
287
- return ibt;
288
- }
289
- async function parseIbtBuffer(buffer) {
290
- return IBT.fromBuffer(buffer);
291
- }
3
+ IBT,
4
+ parseIbt,
5
+ parseIbtBuffer
6
+ } from "./index-6wrtvcny.js";
7
+ import"./index-hxw291vy.js";
8
+ import"./index-c5jf6rjt.js";
9
+ import"./index-wb6ebd0j.js";
10
+ import"./index-ftpvnye9.js";
292
11
  export {
293
12
  parseIbtBuffer,
294
13
  parseIbt,
295
14
  IBT
296
15
  };
297
-
298
- export { IBT, parseIbt, parseIbtBuffer };
@@ -0,0 +1,315 @@
1
+ // @bun
2
+ import {
3
+ $parse
4
+ } from "./index-hxw291vy.js";
5
+ import {
6
+ parseDiskSubHeader,
7
+ parseHeader,
8
+ parseVarHeaders,
9
+ readString,
10
+ readVarValue,
11
+ readVarValueBatch
12
+ } from "./index-c5jf6rjt.js";
13
+ import {
14
+ DISK_SUB_HEADER_OFFSET
15
+ } from "./index-wb6ebd0j.js";
16
+
17
+ // src/session-yaml.ts
18
+ var YAML_SPECIAL_FIELDS_REGEX = /((?:DriverSetupName|UserName|TeamName|AbbrevName|Initials): )(.*)/g;
19
+ var YAML_COMMA_VALUE_REGEX = /(\w+: )(,.*)/g;
20
+ function cleanYamlFast(yaml) {
21
+ let cleaned = "";
22
+ for (let i = 0;i < yaml.length; i++) {
23
+ const code = yaml.charCodeAt(i);
24
+ if (code === 129 || code === 141 || code === 143 || code === 144 || code === 157) {
25
+ cleaned += " ";
26
+ } else if (code === 9 || code === 10 || code === 13 || code >= 32 && code <= 126 || code >= 160 && code <= 255) {
27
+ cleaned += yaml[i];
28
+ }
29
+ }
30
+ cleaned = cleaned.replace(YAML_SPECIAL_FIELDS_REGEX, (_, prefix, value) => {
31
+ const escaped = value.replace(/["\\]/g, "\\$&");
32
+ return `${prefix}"${escaped}"`;
33
+ });
34
+ return cleaned.replace(YAML_COMMA_VALUE_REGEX, '$1"$2"');
35
+ }
36
+ var utf8Decoder = new TextDecoder("utf-8", { fatal: false });
37
+ var win1252Decoder = new TextDecoder("windows-1252");
38
+
39
+ // src/ibt.ts
40
+ class IBT {
41
+ buffer = null;
42
+ view = null;
43
+ header = null;
44
+ diskHeader = null;
45
+ varHeaders = null;
46
+ sessionInfoCache = new Map;
47
+ static sessionRegexCache = new Map;
48
+ rawSessionInfo = null;
49
+ filePath = null;
50
+ static getSectionRegex(key) {
51
+ let regex = IBT.sessionRegexCache.get(key);
52
+ if (!regex) {
53
+ regex = new RegExp(`
54
+ ${key}:
55
+ ([\\s\\S]*?)(?=
56
+
57
+ |$)`);
58
+ IBT.sessionRegexCache.set(key, regex);
59
+ }
60
+ return regex;
61
+ }
62
+ get fileName() {
63
+ return this.filePath;
64
+ }
65
+ get varHeaderBufferTick() {
66
+ return this.header?.varBuf[0]?.tickCount ?? null;
67
+ }
68
+ get varHeaderNames() {
69
+ if (!this.varHeaders)
70
+ return null;
71
+ return Array.from(this.varHeaders.keys());
72
+ }
73
+ get recordCount() {
74
+ return this.diskHeader?.sessionRecordCount ?? 0;
75
+ }
76
+ get sessionLapCount() {
77
+ return this.diskHeader?.sessionLapCount ?? 0;
78
+ }
79
+ get sessionStartTime() {
80
+ return this.diskHeader?.sessionStartTime ?? 0;
81
+ }
82
+ get sessionEndTime() {
83
+ return this.diskHeader?.sessionEndTime ?? 0;
84
+ }
85
+ get tickRate() {
86
+ return this.header?.tickRate ?? 60;
87
+ }
88
+ get bufLen() {
89
+ return this.header?.bufLen ?? 0;
90
+ }
91
+ async open(filePath) {
92
+ this.filePath = filePath;
93
+ const file = Bun.file(filePath);
94
+ const arrayBuffer = await file.arrayBuffer();
95
+ this.buffer = new Uint8Array(arrayBuffer);
96
+ this.view = new DataView(arrayBuffer);
97
+ this.header = parseHeader(this.view);
98
+ this.diskHeader = parseDiskSubHeader(this.view, DISK_SUB_HEADER_OFFSET);
99
+ this.varHeaders = parseVarHeaders(this.view, this.buffer, this.header);
100
+ this.sessionInfoCache.clear();
101
+ this.rawSessionInfo = null;
102
+ }
103
+ openSync(filePath) {
104
+ this.filePath = filePath;
105
+ const file = Bun.file(filePath);
106
+ const arrayBuffer = file.arrayBuffer();
107
+ if (arrayBuffer instanceof Promise) {
108
+ throw new Error("Sync file reading requires Bun.file().bytes() - use open() instead");
109
+ }
110
+ this.buffer = new Uint8Array(arrayBuffer);
111
+ this.view = new DataView(arrayBuffer);
112
+ this.header = parseHeader(this.view);
113
+ this.diskHeader = parseDiskSubHeader(this.view, DISK_SUB_HEADER_OFFSET);
114
+ this.varHeaders = parseVarHeaders(this.view, this.buffer, this.header);
115
+ this.sessionInfoCache.clear();
116
+ this.rawSessionInfo = null;
117
+ }
118
+ static async fromBuffer(buffer) {
119
+ const ibt = new IBT;
120
+ ibt.buffer = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
121
+ ibt.view = new DataView(ibt.buffer.buffer, ibt.buffer.byteOffset, ibt.buffer.byteLength);
122
+ ibt.header = parseHeader(ibt.view);
123
+ ibt.diskHeader = parseDiskSubHeader(ibt.view, DISK_SUB_HEADER_OFFSET);
124
+ ibt.varHeaders = parseVarHeaders(ibt.view, ibt.buffer, ibt.header);
125
+ return ibt;
126
+ }
127
+ close() {
128
+ this.buffer = null;
129
+ this.view = null;
130
+ this.header = null;
131
+ this.diskHeader = null;
132
+ this.varHeaders = null;
133
+ this.sessionInfoCache.clear();
134
+ this.rawSessionInfo = null;
135
+ this.filePath = null;
136
+ }
137
+ getVarHeader(name) {
138
+ return this.varHeaders?.get(name);
139
+ }
140
+ get(index, key) {
141
+ if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
142
+ return null;
143
+ if (index < 0 || index >= this.diskHeader.sessionRecordCount)
144
+ return null;
145
+ const varHeader = this.varHeaders.get(key);
146
+ if (!varHeader)
147
+ return null;
148
+ const varBuf = this.header.varBuf[0];
149
+ if (!varBuf)
150
+ return null;
151
+ const varOffset = varHeader.offset + varBuf.bufOffset + index * this.header.bufLen;
152
+ return readVarValue(this.view, varOffset, varHeader.type, varHeader.count);
153
+ }
154
+ getAll(key) {
155
+ if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
156
+ return null;
157
+ const varHeader = this.varHeaders.get(key);
158
+ if (!varHeader)
159
+ return null;
160
+ const varBuf = this.header.varBuf[0];
161
+ if (!varBuf)
162
+ return null;
163
+ const baseOffset = varBuf.bufOffset;
164
+ const bufLen = this.header.bufLen;
165
+ const recordCount = this.diskHeader.sessionRecordCount;
166
+ const varOffset = varHeader.offset;
167
+ const isArray = varHeader.count > 1;
168
+ const results = new Array(recordCount);
169
+ for (let i = 0;i < recordCount; i++) {
170
+ const offset = baseOffset + i * bufLen + varOffset;
171
+ results[i] = readVarValue(this.view, offset, varHeader.type, varHeader.count);
172
+ }
173
+ return results;
174
+ }
175
+ getAllTyped(key) {
176
+ if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
177
+ return null;
178
+ const varHeader = this.varHeaders.get(key);
179
+ if (!varHeader || varHeader.count !== 1)
180
+ return null;
181
+ const varBuf = this.header.varBuf[0];
182
+ if (!varBuf)
183
+ return null;
184
+ const baseOffset = varBuf.bufOffset;
185
+ const bufLen = this.header.bufLen;
186
+ const recordCount = this.diskHeader.sessionRecordCount;
187
+ const varOffset = varHeader.offset;
188
+ let output;
189
+ switch (varHeader.type) {
190
+ case 4:
191
+ output = new Float32Array(recordCount);
192
+ break;
193
+ case 5:
194
+ output = new Float64Array(recordCount);
195
+ break;
196
+ case 2:
197
+ output = new Int32Array(recordCount);
198
+ break;
199
+ case 3:
200
+ output = new Uint32Array(recordCount);
201
+ break;
202
+ default:
203
+ return null;
204
+ }
205
+ readVarValueBatch(this.view, baseOffset, varOffset, varHeader.type, bufLen, recordCount, output);
206
+ return output;
207
+ }
208
+ getAllMultiple(keys) {
209
+ const results = new Map;
210
+ if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
211
+ return results;
212
+ const varBuf = this.header.varBuf[0];
213
+ if (!varBuf)
214
+ return results;
215
+ const baseOffset = varBuf.bufOffset;
216
+ const bufLen = this.header.bufLen;
217
+ const recordCount = this.diskHeader.sessionRecordCount;
218
+ const varInfos = [];
219
+ for (const key of keys) {
220
+ const varHeader = this.varHeaders.get(key);
221
+ if (varHeader) {
222
+ const data = new Array(recordCount);
223
+ varInfos.push({ key, varHeader, data });
224
+ results.set(key, data);
225
+ }
226
+ }
227
+ for (let i = 0;i < recordCount; i++) {
228
+ const recordOffset = baseOffset + i * bufLen;
229
+ for (const { varHeader, data } of varInfos) {
230
+ const offset = recordOffset + varHeader.offset;
231
+ data[i] = readVarValue(this.view, offset, varHeader.type, varHeader.count);
232
+ }
233
+ }
234
+ return results;
235
+ }
236
+ *iterate(keys) {
237
+ if (!this.header || !this.view || !this.varHeaders || !this.diskHeader)
238
+ return;
239
+ const varBuf = this.header.varBuf[0];
240
+ if (!varBuf)
241
+ return;
242
+ const baseOffset = varBuf.bufOffset;
243
+ const bufLen = this.header.bufLen;
244
+ const recordCount = this.diskHeader.sessionRecordCount;
245
+ const varInfos = [];
246
+ for (const key of keys) {
247
+ const varHeader = this.varHeaders.get(key);
248
+ if (varHeader) {
249
+ varInfos.push({ key, varHeader });
250
+ }
251
+ }
252
+ for (let i = 0;i < recordCount; i++) {
253
+ const recordOffset = baseOffset + i * bufLen;
254
+ const record = new Map;
255
+ for (const { key, varHeader } of varInfos) {
256
+ const offset = recordOffset + varHeader.offset;
257
+ record.set(key, readVarValue(this.view, offset, varHeader.type, varHeader.count));
258
+ }
259
+ yield record;
260
+ }
261
+ }
262
+ getRawSessionInfo() {
263
+ if (!this.header || !this.buffer)
264
+ return null;
265
+ if (this.rawSessionInfo === null) {
266
+ const start = this.header.sessionInfoOffset;
267
+ const len = this.header.sessionInfoLen;
268
+ this.rawSessionInfo = readString(this.buffer, start, len);
269
+ }
270
+ return this.rawSessionInfo;
271
+ }
272
+ getSessionInfo(key) {
273
+ const raw = this.getRawSessionInfo();
274
+ if (!raw)
275
+ return null;
276
+ if (!key) {
277
+ if (!this.sessionInfoCache.has("__full__")) {
278
+ try {
279
+ const cleaned = cleanYamlFast(raw);
280
+ this.sessionInfoCache.set("__full__", $parse(cleaned));
281
+ } catch {
282
+ return null;
283
+ }
284
+ }
285
+ return this.sessionInfoCache.get("__full__");
286
+ }
287
+ if (this.sessionInfoCache.has(key)) {
288
+ return this.sessionInfoCache.get(key);
289
+ }
290
+ const sectionMatch = raw.match(IBT.getSectionRegex(key));
291
+ if (!sectionMatch)
292
+ return null;
293
+ try {
294
+ const sectionYaml = `${key}:
295
+ ${sectionMatch[1]}`;
296
+ const cleaned = cleanYamlFast(sectionYaml);
297
+ const parsed = $parse(cleaned);
298
+ const result = parsed?.[key] ?? null;
299
+ this.sessionInfoCache.set(key, result);
300
+ return result;
301
+ } catch {
302
+ return null;
303
+ }
304
+ }
305
+ }
306
+ async function parseIbt(filePath) {
307
+ const ibt = new IBT;
308
+ await ibt.open(filePath);
309
+ return ibt;
310
+ }
311
+ async function parseIbtBuffer(buffer) {
312
+ return IBT.fromBuffer(buffer);
313
+ }
314
+
315
+ export { IBT, parseIbt, parseIbtBuffer };