@gmod/bbi 8.1.1 → 9.0.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +49 -53
  3. package/dist/array-feature-view.d.ts +4 -1
  4. package/dist/array-feature-view.js.map +1 -1
  5. package/dist/bbi.d.ts +5 -25
  6. package/dist/bbi.js +31 -133
  7. package/dist/bbi.js.map +1 -1
  8. package/dist/bigbed.d.ts +0 -1
  9. package/dist/bigbed.js +19 -51
  10. package/dist/bigbed.js.map +1 -1
  11. package/dist/bigwig.d.ts +1 -2
  12. package/dist/bigwig.js +1 -2
  13. package/dist/bigwig.js.map +1 -1
  14. package/dist/block-view.d.ts +7 -16
  15. package/dist/block-view.js +370 -440
  16. package/dist/block-view.js.map +1 -1
  17. package/dist/parse-bigwig.d.ts +2 -2
  18. package/dist/parse-bigwig.js +5 -5
  19. package/dist/parse-bigwig.js.map +1 -1
  20. package/dist/range.d.ts +1 -15
  21. package/dist/range.js +16 -49
  22. package/dist/range.js.map +1 -1
  23. package/dist/util.d.ts +0 -22
  24. package/dist/util.js +0 -46
  25. package/dist/util.js.map +1 -1
  26. package/dist/wasm/inflate-wasm-inlined.js +85 -86
  27. package/dist/wasm/inflate-wasm-inlined.js.map +1 -1
  28. package/dist/wasm/inflate_wasm.d.ts +1 -1
  29. package/dist/wasm/inflate_wasm.js +10 -4
  30. package/dist/wasm/inflate_wasm.js.map +1 -1
  31. package/dist/wasm/inflate_wasm_bg.d.ts +2 -2
  32. package/dist/wasm/inflate_wasm_bg.js +85 -86
  33. package/dist/wasm/inflate_wasm_bg.js.map +1 -1
  34. package/esm/array-feature-view.d.ts +4 -1
  35. package/esm/array-feature-view.js.map +1 -1
  36. package/esm/bbi.d.ts +5 -25
  37. package/esm/bbi.js +31 -133
  38. package/esm/bbi.js.map +1 -1
  39. package/esm/bigbed.d.ts +0 -1
  40. package/esm/bigbed.js +19 -50
  41. package/esm/bigbed.js.map +1 -1
  42. package/esm/bigwig.d.ts +1 -2
  43. package/esm/bigwig.js +1 -2
  44. package/esm/bigwig.js.map +1 -1
  45. package/esm/block-view.d.ts +7 -16
  46. package/esm/block-view.js +370 -440
  47. package/esm/block-view.js.map +1 -1
  48. package/esm/parse-bigwig.d.ts +2 -2
  49. package/esm/parse-bigwig.js +5 -5
  50. package/esm/parse-bigwig.js.map +1 -1
  51. package/esm/range.d.ts +1 -15
  52. package/esm/range.js +15 -48
  53. package/esm/range.js.map +1 -1
  54. package/esm/util.d.ts +0 -22
  55. package/esm/util.js +0 -42
  56. package/esm/util.js.map +1 -1
  57. package/esm/wasm/inflate-wasm-inlined.js +85 -86
  58. package/esm/wasm/inflate-wasm-inlined.js.map +1 -1
  59. package/esm/wasm/inflate_wasm.d.ts +1 -1
  60. package/esm/wasm/inflate_wasm.js +2 -1
  61. package/esm/wasm/inflate_wasm.js.map +1 -1
  62. package/esm/wasm/inflate_wasm_bg.d.ts +2 -2
  63. package/esm/wasm/inflate_wasm_bg.js +83 -84
  64. package/esm/wasm/inflate_wasm_bg.js.map +1 -1
  65. package/package.json +14 -16
  66. package/src/array-feature-view.ts +8 -0
  67. package/src/bbi.ts +50 -153
  68. package/src/bigbed.ts +22 -55
  69. package/src/bigwig.ts +1 -3
  70. package/src/block-view.ts +526 -634
  71. package/src/parse-bigwig.ts +7 -9
  72. package/src/range.ts +19 -58
  73. package/src/util.ts +0 -46
  74. package/src/wasm/inflate-wasm-inlined.js +101 -102
  75. package/src/wasm/inflate_wasm.js +7 -2
  76. package/src/wasm/inflate_wasm_bg.js +99 -100
  77. package/src/wasm/inflate_wasm_bg.wasm +0 -0
@@ -1,100 +1,3 @@
1
- let wasm;
2
- export function __wbg_set_wasm(val) {
3
- wasm = val;
4
- }
5
-
6
- function addHeapObject(obj) {
7
- if (heap_next === heap.length) heap.push(heap.length + 1);
8
- const idx = heap_next;
9
- heap_next = heap[idx];
10
-
11
- heap[idx] = obj;
12
- return idx;
13
- }
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function getArrayU8FromWasm0(ptr, len) {
22
- ptr = ptr >>> 0;
23
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
24
- }
25
-
26
- let cachedDataViewMemory0 = null;
27
- function getDataViewMemory0() {
28
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
29
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
30
- }
31
- return cachedDataViewMemory0;
32
- }
33
-
34
- function getStringFromWasm0(ptr, len) {
35
- ptr = ptr >>> 0;
36
- return decodeText(ptr, len);
37
- }
38
-
39
- let cachedUint32ArrayMemory0 = null;
40
- function getUint32ArrayMemory0() {
41
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
42
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
43
- }
44
- return cachedUint32ArrayMemory0;
45
- }
46
-
47
- let cachedUint8ArrayMemory0 = null;
48
- function getUint8ArrayMemory0() {
49
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
50
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
51
- }
52
- return cachedUint8ArrayMemory0;
53
- }
54
-
55
- function getObject(idx) { return heap[idx]; }
56
-
57
- let heap = new Array(128).fill(undefined);
58
- heap.push(undefined, null, true, false);
59
-
60
- let heap_next = heap.length;
61
-
62
- function passArray32ToWasm0(arg, malloc) {
63
- const ptr = malloc(arg.length * 4, 4) >>> 0;
64
- getUint32ArrayMemory0().set(arg, ptr / 4);
65
- WASM_VECTOR_LEN = arg.length;
66
- return ptr;
67
- }
68
-
69
- function passArray8ToWasm0(arg, malloc) {
70
- const ptr = malloc(arg.length * 1, 1) >>> 0;
71
- getUint8ArrayMemory0().set(arg, ptr / 1);
72
- WASM_VECTOR_LEN = arg.length;
73
- return ptr;
74
- }
75
-
76
- function takeObject(idx) {
77
- const ret = getObject(idx);
78
- dropObject(idx);
79
- return ret;
80
- }
81
-
82
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
83
- cachedTextDecoder.decode();
84
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
85
- let numBytesDecoded = 0;
86
- function decodeText(ptr, len) {
87
- numBytesDecoded += len;
88
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
89
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
90
- cachedTextDecoder.decode();
91
- numBytesDecoded = len;
92
- }
93
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
94
- }
95
-
96
- let WASM_VECTOR_LEN = 0;
97
-
98
1
  /**
99
2
  * Combined decompress + parse for BigWig blocks
100
3
  * Returns same format as parse_bigwig_block but handles multiple compressed blocks
@@ -302,8 +205,104 @@ export function parse_summary_block(data, req_chr_id, req_start, req_end) {
302
205
  wasm.__wbindgen_add_to_stack_pointer(16);
303
206
  }
304
207
  }
305
-
306
- export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
208
+ export function __wbg_Error_83742b46f01ce22d(arg0, arg1) {
307
209
  const ret = Error(getStringFromWasm0(arg0, arg1));
308
210
  return addHeapObject(ret);
309
- };
211
+ }
212
+ function addHeapObject(obj) {
213
+ if (heap_next === heap.length) heap.push(heap.length + 1);
214
+ const idx = heap_next;
215
+ heap_next = heap[idx];
216
+
217
+ heap[idx] = obj;
218
+ return idx;
219
+ }
220
+
221
+ function dropObject(idx) {
222
+ if (idx < 1028) return;
223
+ heap[idx] = heap_next;
224
+ heap_next = idx;
225
+ }
226
+
227
+ function getArrayU8FromWasm0(ptr, len) {
228
+ ptr = ptr >>> 0;
229
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
230
+ }
231
+
232
+ let cachedDataViewMemory0 = null;
233
+ function getDataViewMemory0() {
234
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
235
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
236
+ }
237
+ return cachedDataViewMemory0;
238
+ }
239
+
240
+ function getStringFromWasm0(ptr, len) {
241
+ ptr = ptr >>> 0;
242
+ return decodeText(ptr, len);
243
+ }
244
+
245
+ let cachedUint32ArrayMemory0 = null;
246
+ function getUint32ArrayMemory0() {
247
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
248
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
249
+ }
250
+ return cachedUint32ArrayMemory0;
251
+ }
252
+
253
+ let cachedUint8ArrayMemory0 = null;
254
+ function getUint8ArrayMemory0() {
255
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
256
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
257
+ }
258
+ return cachedUint8ArrayMemory0;
259
+ }
260
+
261
+ function getObject(idx) { return heap[idx]; }
262
+
263
+ let heap = new Array(1024).fill(undefined);
264
+ heap.push(undefined, null, true, false);
265
+
266
+ let heap_next = heap.length;
267
+
268
+ function passArray32ToWasm0(arg, malloc) {
269
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
270
+ getUint32ArrayMemory0().set(arg, ptr / 4);
271
+ WASM_VECTOR_LEN = arg.length;
272
+ return ptr;
273
+ }
274
+
275
+ function passArray8ToWasm0(arg, malloc) {
276
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
277
+ getUint8ArrayMemory0().set(arg, ptr / 1);
278
+ WASM_VECTOR_LEN = arg.length;
279
+ return ptr;
280
+ }
281
+
282
+ function takeObject(idx) {
283
+ const ret = getObject(idx);
284
+ dropObject(idx);
285
+ return ret;
286
+ }
287
+
288
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
289
+ cachedTextDecoder.decode();
290
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
291
+ let numBytesDecoded = 0;
292
+ function decodeText(ptr, len) {
293
+ numBytesDecoded += len;
294
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
295
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
296
+ cachedTextDecoder.decode();
297
+ numBytesDecoded = len;
298
+ }
299
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
300
+ }
301
+
302
+ let WASM_VECTOR_LEN = 0;
303
+
304
+
305
+ let wasm;
306
+ export function __wbg_set_wasm(val) {
307
+ wasm = val;
308
+ }
Binary file