@geolith/glx 0.1.1 → 0.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/glx_bg.wasm +0 -0
- package/dist/glx_parser_bg.wasm +0 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +11 -7
- package/package.json +1 -1
package/dist/glx_bg.wasm
CHANGED
|
Binary file
|
package/dist/glx_parser_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -204,9 +204,10 @@ export declare class GlxFile {
|
|
|
204
204
|
#private;
|
|
205
205
|
private constructor();
|
|
206
206
|
/**
|
|
207
|
-
* Reads the header and the
|
|
208
|
-
*
|
|
209
|
-
*
|
|
207
|
+
* Reads the file header and the search header (the first 512 bytes),
|
|
208
|
+
* then the boot sections (dictionary root, spatial directory, id
|
|
209
|
+
* directory) and opens the index. Rejects a file without a search
|
|
210
|
+
* part, naming the parts it holds. Call `init` (the wasm module) first.
|
|
210
211
|
*/
|
|
211
212
|
static open(source: Source, read?: ReadOptions): Promise<GlxFile>;
|
|
212
213
|
/** Places in the file. */
|
package/dist/index.js
CHANGED
|
@@ -173,11 +173,13 @@ var Query = class Query {
|
|
|
173
173
|
};
|
|
174
174
|
if (Symbol.dispose) Query.prototype[Symbol.dispose] = Query.prototype.free;
|
|
175
175
|
/**
|
|
176
|
-
* `[offset, length]` of the boot bytes, from the
|
|
176
|
+
* `[offset, length]` of the boot bytes, from the [`header_length`] bytes
|
|
177
|
+
* at the start of the file.
|
|
177
178
|
*
|
|
178
179
|
* # Errors
|
|
179
|
-
* When the
|
|
180
|
-
*
|
|
180
|
+
* When the file header is refused, the file holds no search part (the
|
|
181
|
+
* message names the kinds it holds), or the search header is refused (the
|
|
182
|
+
* part lacks a record feature this reader needs).
|
|
181
183
|
* @param {Uint8Array | number[]} header
|
|
182
184
|
* @returns {Float64Array}
|
|
183
185
|
*/
|
|
@@ -239,7 +241,8 @@ function collection(query, features, name, version) {
|
|
|
239
241
|
}
|
|
240
242
|
}
|
|
241
243
|
/**
|
|
242
|
-
*
|
|
244
|
+
* Bytes to fetch first, from the start of the file: the file header and
|
|
245
|
+
* the search header (512).
|
|
243
246
|
* @returns {number}
|
|
244
247
|
*/
|
|
245
248
|
function headerLength() {
|
|
@@ -462,9 +465,10 @@ var GlxFile = class GlxFile {
|
|
|
462
465
|
this.#read = read;
|
|
463
466
|
}
|
|
464
467
|
/**
|
|
465
|
-
* Reads the header and the
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
+
* Reads the file header and the search header (the first 512 bytes),
|
|
469
|
+
* then the boot sections (dictionary root, spatial directory, id
|
|
470
|
+
* directory) and opens the index. Rejects a file without a search
|
|
471
|
+
* part, naming the parts it holds. Call `init` (the wasm module) first.
|
|
468
472
|
*/
|
|
469
473
|
static async open(source, read = {}) {
|
|
470
474
|
const header = await source.getBytes(0, headerLength());
|
package/package.json
CHANGED