@ifc-lite/cache 1.1.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/LICENSE +373 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/reader.d.ts +16 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +102 -0
- package/dist/reader.js.map +1 -0
- package/dist/sections/entities.d.ts +28 -0
- package/dist/sections/entities.d.ts.map +1 -0
- package/dist/sections/entities.js +121 -0
- package/dist/sections/entities.js.map +1 -0
- package/dist/sections/geometry.d.ts +32 -0
- package/dist/sections/geometry.d.ts.map +1 -0
- package/dist/sections/geometry.js +125 -0
- package/dist/sections/geometry.js.map +1 -0
- package/dist/sections/header.d.ts +14 -0
- package/dist/sections/header.d.ts.map +1 -0
- package/dist/sections/header.js +95 -0
- package/dist/sections/header.js.map +1 -0
- package/dist/sections/properties.d.ts +28 -0
- package/dist/sections/properties.d.ts.map +1 -0
- package/dist/sections/properties.js +201 -0
- package/dist/sections/properties.js.map +1 -0
- package/dist/sections/quantities.d.ts +14 -0
- package/dist/sections/quantities.d.ts.map +1 -0
- package/dist/sections/quantities.js +119 -0
- package/dist/sections/quantities.js.map +1 -0
- package/dist/sections/relationships.d.ts +21 -0
- package/dist/sections/relationships.d.ts.map +1 -0
- package/dist/sections/relationships.js +134 -0
- package/dist/sections/relationships.js.map +1 -0
- package/dist/sections/strings.d.ts +18 -0
- package/dist/sections/strings.d.ts.map +1 -0
- package/dist/sections/strings.js +59 -0
- package/dist/sections/strings.js.map +1 -0
- package/dist/types.d.ts +128 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +45 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/buffer-utils.d.ts +65 -0
- package/dist/utils/buffer-utils.d.ts.map +1 -0
- package/dist/utils/buffer-utils.js +204 -0
- package/dist/utils/buffer-utils.js.map +1 -0
- package/dist/utils/hash.d.ts +12 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +99 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/writer.d.ts +24 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +125 -0
- package/dist/writer.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QuantityTable serialization
|
|
3
|
+
*/
|
|
4
|
+
import type { QuantityTable, StringTable } from '@ifc-lite/data';
|
|
5
|
+
import { BufferWriter, BufferReader } from '../utils/buffer-utils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Write QuantityTable to buffer
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeQuantities(writer: BufferWriter, quantities: QuantityTable): void;
|
|
10
|
+
/**
|
|
11
|
+
* Read QuantityTable from buffer
|
|
12
|
+
*/
|
|
13
|
+
export declare function readQuantities(reader: BufferReader, strings: StringTable): QuantityTable;
|
|
14
|
+
//# sourceMappingURL=quantities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantities.d.ts","sourceRoot":"","sources":["../../src/sections/quantities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,GAAG,IAAI,CAiBrF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,GAAG,aAAa,CAoFxF"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Write QuantityTable to buffer
|
|
6
|
+
*/
|
|
7
|
+
export function writeQuantities(writer, quantities) {
|
|
8
|
+
const count = quantities.count;
|
|
9
|
+
writer.writeUint32(count);
|
|
10
|
+
writer.writeTypedArray(quantities.entityId);
|
|
11
|
+
writer.writeTypedArray(quantities.qsetName);
|
|
12
|
+
writer.writeTypedArray(quantities.quantityName);
|
|
13
|
+
writer.writeTypedArray(quantities.quantityType);
|
|
14
|
+
writer.writeTypedArray(quantities.value);
|
|
15
|
+
writer.writeTypedArray(quantities.unitId);
|
|
16
|
+
writer.writeTypedArray(quantities.formula);
|
|
17
|
+
// Write indices
|
|
18
|
+
writeIndex(writer, quantities.entityIndex);
|
|
19
|
+
writeIndex(writer, quantities.qsetIndex);
|
|
20
|
+
writeIndex(writer, quantities.quantityIndex);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Read QuantityTable from buffer
|
|
24
|
+
*/
|
|
25
|
+
export function readQuantities(reader, strings) {
|
|
26
|
+
const count = reader.readUint32();
|
|
27
|
+
const entityId = reader.readUint32Array(count);
|
|
28
|
+
const qsetName = reader.readUint32Array(count);
|
|
29
|
+
const quantityName = reader.readUint32Array(count);
|
|
30
|
+
const quantityType = reader.readUint8Array(count);
|
|
31
|
+
const value = reader.readFloat64Array(count);
|
|
32
|
+
const unitId = reader.readInt32Array(count);
|
|
33
|
+
const formula = reader.readUint32Array(count);
|
|
34
|
+
const entityIndex = readIndex(reader);
|
|
35
|
+
const qsetIndex = readIndex(reader);
|
|
36
|
+
const quantityIndex = readIndex(reader);
|
|
37
|
+
return {
|
|
38
|
+
count,
|
|
39
|
+
entityId,
|
|
40
|
+
qsetName,
|
|
41
|
+
quantityName,
|
|
42
|
+
quantityType,
|
|
43
|
+
value,
|
|
44
|
+
unitId,
|
|
45
|
+
formula,
|
|
46
|
+
entityIndex,
|
|
47
|
+
qsetIndex,
|
|
48
|
+
quantityIndex,
|
|
49
|
+
getForEntity: (id) => {
|
|
50
|
+
const rowIndices = entityIndex.get(id) || [];
|
|
51
|
+
const qsets = new Map();
|
|
52
|
+
for (const idx of rowIndices) {
|
|
53
|
+
const qsetNameStr = strings.get(qsetName[idx]);
|
|
54
|
+
if (!qsets.has(qsetNameStr)) {
|
|
55
|
+
qsets.set(qsetNameStr, {
|
|
56
|
+
name: qsetNameStr,
|
|
57
|
+
quantities: [],
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const qset = qsets.get(qsetNameStr);
|
|
61
|
+
const quantNameStr = strings.get(quantityName[idx]);
|
|
62
|
+
qset.quantities.push({
|
|
63
|
+
name: quantNameStr,
|
|
64
|
+
type: quantityType[idx],
|
|
65
|
+
value: value[idx],
|
|
66
|
+
formula: formula[idx] > 0 ? strings.get(formula[idx]) : undefined,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return Array.from(qsets.values());
|
|
70
|
+
},
|
|
71
|
+
getQuantityValue: (id, qset, quant) => {
|
|
72
|
+
const rowIndices = entityIndex.get(id) || [];
|
|
73
|
+
const qsetIdx = strings.indexOf(qset);
|
|
74
|
+
const quantIdx = strings.indexOf(quant);
|
|
75
|
+
for (const idx of rowIndices) {
|
|
76
|
+
if (qsetName[idx] === qsetIdx && quantityName[idx] === quantIdx) {
|
|
77
|
+
return value[idx];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
},
|
|
82
|
+
sumByType: (quantName) => {
|
|
83
|
+
const quantIdx = strings.indexOf(quantName);
|
|
84
|
+
if (quantIdx < 0)
|
|
85
|
+
return 0;
|
|
86
|
+
const rowIndices = quantityIndex.get(quantIdx) || [];
|
|
87
|
+
let sum = 0;
|
|
88
|
+
for (const idx of rowIndices) {
|
|
89
|
+
sum += value[idx];
|
|
90
|
+
}
|
|
91
|
+
return sum;
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function writeIndex(writer, index) {
|
|
96
|
+
writer.writeUint32(index.size);
|
|
97
|
+
for (const [key, values] of index) {
|
|
98
|
+
writer.writeUint32(key);
|
|
99
|
+
writer.writeUint32(values.length);
|
|
100
|
+
for (const v of values) {
|
|
101
|
+
writer.writeUint32(v);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function readIndex(reader) {
|
|
106
|
+
const size = reader.readUint32();
|
|
107
|
+
const index = new Map();
|
|
108
|
+
for (let i = 0; i < size; i++) {
|
|
109
|
+
const key = reader.readUint32();
|
|
110
|
+
const valueCount = reader.readUint32();
|
|
111
|
+
const values = [];
|
|
112
|
+
for (let j = 0; j < valueCount; j++) {
|
|
113
|
+
values.push(reader.readUint32());
|
|
114
|
+
}
|
|
115
|
+
index.set(key, values);
|
|
116
|
+
}
|
|
117
|
+
return index;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=quantities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantities.js","sourceRoot":"","sources":["../../src/sections/quantities.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAoB,EAAE,UAAyB;IAC7E,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAE/B,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAE1B,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC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M,CAAC,UAAU,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACvC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QACnC,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RelationshipGraph serialization (CSR format)
|
|
3
|
+
*/
|
|
4
|
+
import type { RelationshipGraph } from '@ifc-lite/data';
|
|
5
|
+
import { BufferWriter, BufferReader } from '../utils/buffer-utils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Write RelationshipGraph to buffer
|
|
8
|
+
* Format (for each direction - forward and inverse):
|
|
9
|
+
* - nodeCount: uint32
|
|
10
|
+
* - nodes: [entityId:uint32, offset:uint32, count:uint32][]
|
|
11
|
+
* - edgeCount: uint32
|
|
12
|
+
* - edgeTargets: Uint32Array[edgeCount]
|
|
13
|
+
* - edgeTypes: Uint16Array[edgeCount]
|
|
14
|
+
* - edgeRelIds: Uint32Array[edgeCount]
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeRelationships(writer: BufferWriter, graph: RelationshipGraph): void;
|
|
17
|
+
/**
|
|
18
|
+
* Read RelationshipGraph from buffer
|
|
19
|
+
*/
|
|
20
|
+
export declare function readRelationships(reader: BufferReader): RelationshipGraph;
|
|
21
|
+
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/sections/relationships.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAA0B,MAAM,gBAAgB,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAMvF;AAgCD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,iBAAiB,CA+BzE"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { RelationshipType } from '@ifc-lite/data';
|
|
5
|
+
/**
|
|
6
|
+
* Write RelationshipGraph to buffer
|
|
7
|
+
* Format (for each direction - forward and inverse):
|
|
8
|
+
* - nodeCount: uint32
|
|
9
|
+
* - nodes: [entityId:uint32, offset:uint32, count:uint32][]
|
|
10
|
+
* - edgeCount: uint32
|
|
11
|
+
* - edgeTargets: Uint32Array[edgeCount]
|
|
12
|
+
* - edgeTypes: Uint16Array[edgeCount]
|
|
13
|
+
* - edgeRelIds: Uint32Array[edgeCount]
|
|
14
|
+
*/
|
|
15
|
+
export function writeRelationships(writer, graph) {
|
|
16
|
+
// Write forward edges
|
|
17
|
+
writeEdges(writer, graph.forward);
|
|
18
|
+
// Write inverse edges
|
|
19
|
+
writeEdges(writer, graph.inverse);
|
|
20
|
+
}
|
|
21
|
+
function writeEdges(writer, edges) {
|
|
22
|
+
// Write node mappings
|
|
23
|
+
const nodeCount = edges.offsets.size;
|
|
24
|
+
writer.writeUint32(nodeCount);
|
|
25
|
+
for (const [entityId, offset] of edges.offsets) {
|
|
26
|
+
const count = edges.counts.get(entityId) ?? 0;
|
|
27
|
+
writer.writeUint32(entityId);
|
|
28
|
+
writer.writeUint32(offset);
|
|
29
|
+
writer.writeUint32(count);
|
|
30
|
+
}
|
|
31
|
+
// Write edge arrays
|
|
32
|
+
const edgeCount = edges.edgeTargets.length;
|
|
33
|
+
writer.writeUint32(edgeCount);
|
|
34
|
+
writer.writeTypedArray(edges.edgeTargets);
|
|
35
|
+
writer.writeTypedArray(edges.edgeTypes);
|
|
36
|
+
writer.writeTypedArray(edges.edgeRelIds);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Read RelationshipGraph from buffer
|
|
40
|
+
*/
|
|
41
|
+
export function readRelationships(reader) {
|
|
42
|
+
const forward = readEdges(reader);
|
|
43
|
+
const inverse = readEdges(reader);
|
|
44
|
+
return {
|
|
45
|
+
forward,
|
|
46
|
+
inverse,
|
|
47
|
+
getRelated: (entityId, relType, direction) => {
|
|
48
|
+
const edges = direction === 'forward'
|
|
49
|
+
? forward.getEdges(entityId, relType)
|
|
50
|
+
: inverse.getEdges(entityId, relType);
|
|
51
|
+
return edges.map((e) => e.target);
|
|
52
|
+
},
|
|
53
|
+
hasRelationship: (sourceId, targetId, relType) => {
|
|
54
|
+
const edges = forward.getEdges(sourceId, relType);
|
|
55
|
+
return edges.some((e) => e.target === targetId);
|
|
56
|
+
},
|
|
57
|
+
getRelationshipsBetween: (sourceId, targetId) => {
|
|
58
|
+
const edges = forward.getEdges(sourceId);
|
|
59
|
+
return edges
|
|
60
|
+
.filter((e) => e.target === targetId)
|
|
61
|
+
.map((e) => ({
|
|
62
|
+
relationshipId: e.relationshipId,
|
|
63
|
+
type: e.type,
|
|
64
|
+
typeName: relationshipTypeToString(e.type),
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function readEdges(reader) {
|
|
70
|
+
const nodeCount = reader.readUint32();
|
|
71
|
+
const offsets = new Map();
|
|
72
|
+
const counts = new Map();
|
|
73
|
+
for (let i = 0; i < nodeCount; i++) {
|
|
74
|
+
const entityId = reader.readUint32();
|
|
75
|
+
const offset = reader.readUint32();
|
|
76
|
+
const count = reader.readUint32();
|
|
77
|
+
offsets.set(entityId, offset);
|
|
78
|
+
counts.set(entityId, count);
|
|
79
|
+
}
|
|
80
|
+
const edgeCount = reader.readUint32();
|
|
81
|
+
const edgeTargets = reader.readUint32Array(edgeCount);
|
|
82
|
+
const edgeTypes = reader.readUint16Array(edgeCount);
|
|
83
|
+
const edgeRelIds = reader.readUint32Array(edgeCount);
|
|
84
|
+
return {
|
|
85
|
+
offsets,
|
|
86
|
+
counts,
|
|
87
|
+
edgeTargets,
|
|
88
|
+
edgeTypes,
|
|
89
|
+
edgeRelIds,
|
|
90
|
+
getEdges(entityId, type) {
|
|
91
|
+
const offset = offsets.get(entityId);
|
|
92
|
+
if (offset === undefined)
|
|
93
|
+
return [];
|
|
94
|
+
const count = counts.get(entityId);
|
|
95
|
+
const edges = [];
|
|
96
|
+
for (let i = offset; i < offset + count; i++) {
|
|
97
|
+
if (type === undefined || edgeTypes[i] === type) {
|
|
98
|
+
edges.push({
|
|
99
|
+
target: edgeTargets[i],
|
|
100
|
+
type: edgeTypes[i],
|
|
101
|
+
relationshipId: edgeRelIds[i],
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return edges;
|
|
106
|
+
},
|
|
107
|
+
getTargets(entityId, type) {
|
|
108
|
+
return this.getEdges(entityId, type).map((e) => e.target);
|
|
109
|
+
},
|
|
110
|
+
hasAnyEdges(entityId) {
|
|
111
|
+
return offsets.has(entityId);
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function relationshipTypeToString(type) {
|
|
116
|
+
const names = {
|
|
117
|
+
[RelationshipType.ContainsElements]: 'IfcRelContainedInSpatialStructure',
|
|
118
|
+
[RelationshipType.Aggregates]: 'IfcRelAggregates',
|
|
119
|
+
[RelationshipType.DefinesByProperties]: 'IfcRelDefinesByProperties',
|
|
120
|
+
[RelationshipType.DefinesByType]: 'IfcRelDefinesByType',
|
|
121
|
+
[RelationshipType.AssociatesMaterial]: 'IfcRelAssociatesMaterial',
|
|
122
|
+
[RelationshipType.AssociatesClassification]: 'IfcRelAssociatesClassification',
|
|
123
|
+
[RelationshipType.VoidsElement]: 'IfcRelVoidsElement',
|
|
124
|
+
[RelationshipType.FillsElement]: 'IfcRelFillsElement',
|
|
125
|
+
[RelationshipType.ConnectsPathElements]: 'IfcRelConnectsPathElements',
|
|
126
|
+
[RelationshipType.ConnectsElements]: 'IfcRelConnectsElements',
|
|
127
|
+
[RelationshipType.SpaceBoundary]: 'IfcRelSpaceBoundary',
|
|
128
|
+
[RelationshipType.AssignsToGroup]: 'IfcRelAssignsToGroup',
|
|
129
|
+
[RelationshipType.AssignsToProduct]: 'IfcRelAssignsToProduct',
|
|
130
|
+
[RelationshipType.ReferencedInSpatialStructure]: 'ReferencedInSpatialStructure',
|
|
131
|
+
};
|
|
132
|
+
return names[type] || 'Unknown';
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=relationships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/sections/relationships.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAO/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAoB,EAAE,KAAwB;IAC/E,sBAAsB;IACtB,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAElC,sBAAsB;IACtB,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,UAAU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,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StringTable serialization
|
|
3
|
+
*/
|
|
4
|
+
import { StringTable } from '@ifc-lite/data';
|
|
5
|
+
import { BufferWriter, BufferReader } from '../utils/buffer-utils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Write StringTable to buffer
|
|
8
|
+
* Format:
|
|
9
|
+
* - count: uint32
|
|
10
|
+
* - offsets: uint32[count+1] (cumulative byte offsets)
|
|
11
|
+
* - data: concatenated UTF-8 strings
|
|
12
|
+
*/
|
|
13
|
+
export declare function writeStrings(writer: BufferWriter, strings: StringTable): void;
|
|
14
|
+
/**
|
|
15
|
+
* Read StringTable from buffer
|
|
16
|
+
*/
|
|
17
|
+
export declare function readStrings(reader: BufferReader): StringTable;
|
|
18
|
+
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/sections/strings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CA2B7E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAsB7D"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* StringTable serialization
|
|
6
|
+
*/
|
|
7
|
+
import { StringTable } from '@ifc-lite/data';
|
|
8
|
+
/**
|
|
9
|
+
* Write StringTable to buffer
|
|
10
|
+
* Format:
|
|
11
|
+
* - count: uint32
|
|
12
|
+
* - offsets: uint32[count+1] (cumulative byte offsets)
|
|
13
|
+
* - data: concatenated UTF-8 strings
|
|
14
|
+
*/
|
|
15
|
+
export function writeStrings(writer, strings) {
|
|
16
|
+
const allStrings = strings.getAll();
|
|
17
|
+
const count = allStrings.length;
|
|
18
|
+
// Encode all strings to UTF-8
|
|
19
|
+
const encoder = new TextEncoder();
|
|
20
|
+
const encoded = allStrings.map((s) => encoder.encode(s));
|
|
21
|
+
// Calculate offsets
|
|
22
|
+
const offsets = new Uint32Array(count + 1);
|
|
23
|
+
let totalBytes = 0;
|
|
24
|
+
for (let i = 0; i < count; i++) {
|
|
25
|
+
offsets[i] = totalBytes;
|
|
26
|
+
totalBytes += encoded[i].length;
|
|
27
|
+
}
|
|
28
|
+
offsets[count] = totalBytes;
|
|
29
|
+
// Write count
|
|
30
|
+
writer.writeUint32(count);
|
|
31
|
+
// Write offsets array
|
|
32
|
+
writer.writeTypedArray(offsets);
|
|
33
|
+
// Write concatenated string data
|
|
34
|
+
for (const bytes of encoded) {
|
|
35
|
+
writer.writeBytes(bytes);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Read StringTable from buffer
|
|
40
|
+
*/
|
|
41
|
+
export function readStrings(reader) {
|
|
42
|
+
const count = reader.readUint32();
|
|
43
|
+
// Read offsets
|
|
44
|
+
const offsets = reader.readUint32Array(count + 1);
|
|
45
|
+
// Read total string data
|
|
46
|
+
const totalBytes = offsets[count];
|
|
47
|
+
const data = reader.readBytes(totalBytes);
|
|
48
|
+
// Decode strings
|
|
49
|
+
const decoder = new TextDecoder();
|
|
50
|
+
const strings = new StringTable();
|
|
51
|
+
for (let i = 0; i < count; i++) {
|
|
52
|
+
const start = offsets[i];
|
|
53
|
+
const end = offsets[i + 1];
|
|
54
|
+
const str = decoder.decode(data.subarray(start, end));
|
|
55
|
+
strings.intern(str);
|
|
56
|
+
}
|
|
57
|
+
return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ACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAoB;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAElC,eAAe;IACf,MAAM,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAElD,yBAAyB;IACzB,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAE1C,iBAAiB;IACjB,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binary cache format types for .ifc-lite files
|
|
3
|
+
*/
|
|
4
|
+
import type { EntityTable, PropertyTable, QuantityTable, RelationshipGraph, StringTable, SpatialHierarchy } from '@ifc-lite/data';
|
|
5
|
+
import type { MeshData, CoordinateInfo } from '@ifc-lite/geometry';
|
|
6
|
+
/** Magic bytes: "IFCL" */
|
|
7
|
+
export declare const MAGIC = 1279477321;
|
|
8
|
+
/** Current format version */
|
|
9
|
+
export declare const FORMAT_VERSION = 1;
|
|
10
|
+
/** Section types in the binary format */
|
|
11
|
+
export declare enum SectionType {
|
|
12
|
+
Strings = 1,
|
|
13
|
+
Entities = 2,
|
|
14
|
+
Properties = 3,
|
|
15
|
+
Quantities = 4,
|
|
16
|
+
Relationships = 5,
|
|
17
|
+
Geometry = 6,
|
|
18
|
+
Spatial = 7,
|
|
19
|
+
Bounds = 8
|
|
20
|
+
}
|
|
21
|
+
/** IFC schema version */
|
|
22
|
+
export declare enum SchemaVersion {
|
|
23
|
+
IFC2X3 = 0,
|
|
24
|
+
IFC4 = 1,
|
|
25
|
+
IFC4X3 = 2
|
|
26
|
+
}
|
|
27
|
+
/** Header flags */
|
|
28
|
+
export declare enum HeaderFlags {
|
|
29
|
+
None = 0,
|
|
30
|
+
Compressed = 1,
|
|
31
|
+
HasGeometry = 2,
|
|
32
|
+
HasSpatial = 4
|
|
33
|
+
}
|
|
34
|
+
/** Section flags */
|
|
35
|
+
export declare enum SectionFlags {
|
|
36
|
+
None = 0,
|
|
37
|
+
Compressed = 1
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Header structure (64 bytes)
|
|
41
|
+
*/
|
|
42
|
+
export interface CacheHeader {
|
|
43
|
+
magic: number;
|
|
44
|
+
version: number;
|
|
45
|
+
flags: HeaderFlags;
|
|
46
|
+
sourceHash: bigint;
|
|
47
|
+
schema: SchemaVersion;
|
|
48
|
+
entityCount: number;
|
|
49
|
+
totalVertices: number;
|
|
50
|
+
totalTriangles: number;
|
|
51
|
+
sectionCount: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Section table entry (16 bytes each)
|
|
55
|
+
*/
|
|
56
|
+
export interface SectionEntry {
|
|
57
|
+
type: SectionType;
|
|
58
|
+
flags: SectionFlags;
|
|
59
|
+
offset: number;
|
|
60
|
+
size: number;
|
|
61
|
+
compressedSize: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Options for writing cache
|
|
65
|
+
*/
|
|
66
|
+
export interface CacheWriteOptions {
|
|
67
|
+
/** Include geometry data (default: true) */
|
|
68
|
+
includeGeometry?: boolean;
|
|
69
|
+
/** Include spatial hierarchy (default: true) */
|
|
70
|
+
includeSpatialHierarchy?: boolean;
|
|
71
|
+
/** Compress sections (default: false, future feature) */
|
|
72
|
+
compress?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Options for reading cache
|
|
76
|
+
*/
|
|
77
|
+
export interface CacheReadOptions {
|
|
78
|
+
/** Skip loading geometry (default: false) */
|
|
79
|
+
skipGeometry?: boolean;
|
|
80
|
+
/** Skip loading spatial hierarchy (default: false) */
|
|
81
|
+
skipSpatialHierarchy?: boolean;
|
|
82
|
+
/** Validate source hash against provided buffer */
|
|
83
|
+
sourceBuffer?: ArrayBuffer;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Result from reading header only
|
|
87
|
+
*/
|
|
88
|
+
export interface CacheHeaderInfo {
|
|
89
|
+
version: number;
|
|
90
|
+
schema: SchemaVersion;
|
|
91
|
+
sourceHash: bigint;
|
|
92
|
+
entityCount: number;
|
|
93
|
+
totalVertices: number;
|
|
94
|
+
totalTriangles: number;
|
|
95
|
+
hasGeometry: boolean;
|
|
96
|
+
hasSpatialHierarchy: boolean;
|
|
97
|
+
sections: SectionEntry[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Complete data store for IFC model
|
|
101
|
+
*/
|
|
102
|
+
export interface IfcDataStore {
|
|
103
|
+
schema: SchemaVersion;
|
|
104
|
+
entityCount: number;
|
|
105
|
+
strings: StringTable;
|
|
106
|
+
entities: EntityTable;
|
|
107
|
+
properties: PropertyTable;
|
|
108
|
+
quantities: QuantityTable;
|
|
109
|
+
relationships: RelationshipGraph;
|
|
110
|
+
spatialHierarchy?: SpatialHierarchy;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Result from reading cache
|
|
114
|
+
*/
|
|
115
|
+
export interface CacheReadResult {
|
|
116
|
+
dataStore: IfcDataStore;
|
|
117
|
+
geometry?: {
|
|
118
|
+
meshes: MeshData[];
|
|
119
|
+
totalVertices: number;
|
|
120
|
+
totalTriangles: number;
|
|
121
|
+
coordinateInfo: CoordinateInfo;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** Header size in bytes */
|
|
125
|
+
export declare const HEADER_SIZE = 64;
|
|
126
|
+
/** Section entry size in bytes */
|
|
127
|
+
export declare const SECTION_ENTRY_SIZE = 16;
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClI,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEnE,0BAA0B;AAC1B,eAAO,MAAM,KAAK,aAAa,CAAC;AAEhC,6BAA6B;AAC7B,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,yCAAyC;AACzC,oBAAY,WAAW;IACrB,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,UAAU,IAAI;IACd,UAAU,IAAI;IACd,aAAa,IAAI;IACjB,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,yBAAyB;AACzB,oBAAY,aAAa;IACvB,MAAM,IAAI;IACV,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAED,mBAAmB;AACnB,oBAAY,WAAW;IACrB,IAAI,IAAI;IACR,UAAU,IAAS;IACnB,WAAW,IAAS;IACpB,UAAU,IAAS;CACpB;AAED,oBAAoB;AACpB,oBAAY,YAAY;IACtB,IAAI,IAAI;IACR,UAAU,IAAS;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WA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Y;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,aAAa,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,QAAQ,EAAE,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,cAAc,CAAC;KAChC,CAAC;CACH;AAED,2BAA2B;AAC3B,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,kCAAkC;AAClC,eAAO,MAAM,kBAAkB,KAAK,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Magic bytes: "IFCL" */
|
|
5
|
+
export const MAGIC = 0x4C434649; // "IFCL" in little-endian
|
|
6
|
+
/** Current format version */
|
|
7
|
+
export const FORMAT_VERSION = 1;
|
|
8
|
+
/** Section types in the binary format */
|
|
9
|
+
export var SectionType;
|
|
10
|
+
(function (SectionType) {
|
|
11
|
+
SectionType[SectionType["Strings"] = 1] = "Strings";
|
|
12
|
+
SectionType[SectionType["Entities"] = 2] = "Entities";
|
|
13
|
+
SectionType[SectionType["Properties"] = 3] = "Properties";
|
|
14
|
+
SectionType[SectionType["Quantities"] = 4] = "Quantities";
|
|
15
|
+
SectionType[SectionType["Relationships"] = 5] = "Relationships";
|
|
16
|
+
SectionType[SectionType["Geometry"] = 6] = "Geometry";
|
|
17
|
+
SectionType[SectionType["Spatial"] = 7] = "Spatial";
|
|
18
|
+
SectionType[SectionType["Bounds"] = 8] = "Bounds";
|
|
19
|
+
})(SectionType || (SectionType = {}));
|
|
20
|
+
/** IFC schema version */
|
|
21
|
+
export var SchemaVersion;
|
|
22
|
+
(function (SchemaVersion) {
|
|
23
|
+
SchemaVersion[SchemaVersion["IFC2X3"] = 0] = "IFC2X3";
|
|
24
|
+
SchemaVersion[SchemaVersion["IFC4"] = 1] = "IFC4";
|
|
25
|
+
SchemaVersion[SchemaVersion["IFC4X3"] = 2] = "IFC4X3";
|
|
26
|
+
})(SchemaVersion || (SchemaVersion = {}));
|
|
27
|
+
/** Header flags */
|
|
28
|
+
export var HeaderFlags;
|
|
29
|
+
(function (HeaderFlags) {
|
|
30
|
+
HeaderFlags[HeaderFlags["None"] = 0] = "None";
|
|
31
|
+
HeaderFlags[HeaderFlags["Compressed"] = 1] = "Compressed";
|
|
32
|
+
HeaderFlags[HeaderFlags["HasGeometry"] = 2] = "HasGeometry";
|
|
33
|
+
HeaderFlags[HeaderFlags["HasSpatial"] = 4] = "HasSpatial";
|
|
34
|
+
})(HeaderFlags || (HeaderFlags = {}));
|
|
35
|
+
/** Section flags */
|
|
36
|
+
export var SectionFlags;
|
|
37
|
+
(function (SectionFlags) {
|
|
38
|
+
SectionFlags[SectionFlags["None"] = 0] = "None";
|
|
39
|
+
SectionFlags[SectionFlags["Compressed"] = 1] = "Compressed";
|
|
40
|
+
})(SectionFlags || (SectionFlags = {}));
|
|
41
|
+
/** Header size in bytes */
|
|
42
|
+
export const HEADER_SIZE = 64;
|
|
43
|
+
/** Section entry size in bytes */
|
|
44
|
+
export const SECTION_ENTRY_SIZE = 16;
|
|
45
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,0BAA0B;AAC1B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,0BAA0B;AAE3D,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,yCAAyC;AACzC,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,qDAAY,CAAA;IACZ,yDAAc,CAAA;IACd,yDAAc,CAAA;IACd,+DAAiB,CAAA;IACjB,qDAAY,CAAA;IACZ,mDAAW,CAAA;IACX,iDAAU,CAAA;AACZ,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,yBAAyB;AACzB,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,qDAAU,CAAA;IACV,iDAAQ,CAAA;IACR,qDAAU,CAAA;AACZ,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,mBAAmB;AACnB,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,6CAAQ,CAAA;IACR,yDAAmB,CAAA;IACnB,2DAAoB,CAAA;IACpB,yDAAmB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,oBAAoB;AACpB,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+CAAQ,CAAA;IACR,2DAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AA+FD,2BAA2B;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,kCAAkC;AAClC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buffer utilities for reading/writing binary data
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Writer for building binary buffers
|
|
6
|
+
*/
|
|
7
|
+
export declare class BufferWriter {
|
|
8
|
+
private chunks;
|
|
9
|
+
private currentChunk;
|
|
10
|
+
private view;
|
|
11
|
+
private offset;
|
|
12
|
+
private totalSize;
|
|
13
|
+
constructor(initialSize?: number);
|
|
14
|
+
private ensureCapacity;
|
|
15
|
+
writeUint8(value: number): void;
|
|
16
|
+
writeUint16(value: number): void;
|
|
17
|
+
writeUint32(value: number): void;
|
|
18
|
+
writeInt32(value: number): void;
|
|
19
|
+
writeBigUint64(value: bigint): void;
|
|
20
|
+
writeFloat32(value: number): void;
|
|
21
|
+
writeFloat64(value: number): void;
|
|
22
|
+
writeBytes(data: Uint8Array): void;
|
|
23
|
+
writeTypedArray(arr: TypedArray): void;
|
|
24
|
+
writeString(str: string): void;
|
|
25
|
+
/** Pad to alignment boundary */
|
|
26
|
+
align(boundary: number): void;
|
|
27
|
+
/** Get current position */
|
|
28
|
+
get position(): number;
|
|
29
|
+
/** Build final buffer */
|
|
30
|
+
build(): ArrayBuffer;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Reader for parsing binary buffers
|
|
34
|
+
*/
|
|
35
|
+
export declare class BufferReader {
|
|
36
|
+
private view;
|
|
37
|
+
private bytes;
|
|
38
|
+
private offset;
|
|
39
|
+
constructor(buffer: ArrayBuffer);
|
|
40
|
+
get position(): number;
|
|
41
|
+
set position(pos: number);
|
|
42
|
+
get remaining(): number;
|
|
43
|
+
readUint8(): number;
|
|
44
|
+
readUint16(): number;
|
|
45
|
+
readUint32(): number;
|
|
46
|
+
readInt32(): number;
|
|
47
|
+
readBigUint64(): bigint;
|
|
48
|
+
readFloat32(): number;
|
|
49
|
+
readFloat64(): number;
|
|
50
|
+
readBytes(length: number): Uint8Array;
|
|
51
|
+
readUint8Array(length: number): Uint8Array;
|
|
52
|
+
readUint16Array(length: number): Uint16Array;
|
|
53
|
+
readUint32Array(length: number): Uint32Array;
|
|
54
|
+
readInt32Array(length: number): Int32Array;
|
|
55
|
+
readFloat32Array(length: number): Float32Array;
|
|
56
|
+
readFloat64Array(length: number): Float64Array;
|
|
57
|
+
readString(): string;
|
|
58
|
+
/** Skip to alignment boundary */
|
|
59
|
+
align(boundary: number): void;
|
|
60
|
+
/** Skip bytes */
|
|
61
|
+
skip(bytes: number): void;
|
|
62
|
+
}
|
|
63
|
+
type TypedArray = Uint8Array | Uint16Array | Uint32Array | Int32Array | Float32Array | Float64Array;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=buffer-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer-utils.d.ts","sourceRoot":"","sources":["../../src/utils/buffer-utils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,SAAS,CAAa;gBAElB,WAAW,GAAE,MAAoB;IAK7C,OAAO,CAAC,cAAc;IAatB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMhC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM/B,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMnC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMjC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMjC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAMlC,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI;IAKtC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO9B,gCAAgC;IAChC,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQ7B,2BAA2B;IAC3B,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED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