@loaders.gl/compression 4.2.0-alpha.5 → 4.2.0-alpha.6

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/index.cjs CHANGED
@@ -97,12 +97,13 @@ var Compression = class {
97
97
 
98
98
  // dist/lib/no-compression.js
99
99
  var NoCompression = class extends Compression {
100
+ name = "uncompressed";
101
+ extensions = [];
102
+ contentEncodings = [];
103
+ isSupported = true;
104
+ options;
100
105
  constructor(options) {
101
106
  super(options);
102
- this.name = "uncompressed";
103
- this.extensions = [];
104
- this.contentEncodings = [];
105
- this.isSupported = true;
106
107
  this.options = options || {};
107
108
  }
108
109
  compressSync(input) {
@@ -125,13 +126,14 @@ var import_pako = __toESM(require("pako"), 1);
125
126
  var import_zlib = __toESM(require("zlib"), 1);
126
127
  var import_loader_utils3 = require("@loaders.gl/loader-utils");
127
128
  var DeflateCompression = class extends Compression {
129
+ name = "deflate";
130
+ extensions = [];
131
+ contentEncodings = ["deflate"];
132
+ isSupported = true;
133
+ options;
134
+ _chunks = [];
128
135
  constructor(options = {}) {
129
136
  super(options);
130
- this.name = "deflate";
131
- this.extensions = [];
132
- this.contentEncodings = ["deflate"];
133
- this.isSupported = true;
134
- this._chunks = [];
135
137
  this.options = options;
136
138
  }
137
139
  async compress(input) {
@@ -244,12 +246,12 @@ var DeflateCompression = class extends Compression {
244
246
 
245
247
  // dist/lib/gzip-compression.js
246
248
  var GZipCompression = class extends DeflateCompression {
249
+ name = "gzip";
250
+ extensions = ["gz", "gzip"];
251
+ contentEncodings = ["gzip", "x-gzip"];
252
+ isSupported = true;
247
253
  constructor(options) {
248
254
  super({ ...options, deflate: { ...options == null ? void 0 : options.gzip, gzip: true } });
249
- this.name = "gzip";
250
- this.extensions = ["gz", "gzip"];
251
- this.contentEncodings = ["gzip", "x-gzip"];
252
- this.isSupported = true;
253
255
  }
254
256
  };
255
257
 
@@ -2250,12 +2252,13 @@ var DEFAULT_BROTLI_OPTIONS = {
2250
2252
  };
2251
2253
  var brotli;
2252
2254
  var BrotliCompression = class extends Compression {
2255
+ name = "brotli";
2256
+ extensions = ["br"];
2257
+ contentEncodings = ["br"];
2258
+ isSupported = true;
2259
+ options;
2253
2260
  constructor(options) {
2254
2261
  super(options);
2255
- this.name = "brotli";
2256
- this.extensions = ["br"];
2257
- this.contentEncodings = ["br"];
2258
- this.isSupported = true;
2259
2262
  this.options = options;
2260
2263
  }
2261
2264
  /**
@@ -2319,12 +2322,13 @@ var BrotliCompression = class extends Compression {
2319
2322
  // dist/lib/snappy-compression.js
2320
2323
  var import_snappyjs = require("snappyjs");
2321
2324
  var SnappyCompression = class extends Compression {
2325
+ name = "snappy";
2326
+ extensions = [];
2327
+ contentEncodings = [];
2328
+ isSupported = true;
2329
+ options;
2322
2330
  constructor(options) {
2323
2331
  super(options);
2324
- this.name = "snappy";
2325
- this.extensions = [];
2326
- this.contentEncodings = [];
2327
- this.isSupported = true;
2328
2332
  this.options = options || {};
2329
2333
  }
2330
2334
  compressSync(input) {
@@ -2340,13 +2344,14 @@ var import_loader_utils6 = require("@loaders.gl/loader-utils");
2340
2344
  var LZ4_MAGIC_NUMBER = 407708164;
2341
2345
  var lz4js;
2342
2346
  var LZ4Compression = class extends Compression {
2347
+ name = "lz4";
2348
+ extensions = ["lz4"];
2349
+ contentEncodings = ["x-lz4"];
2350
+ isSupported = true;
2351
+ options;
2343
2352
  constructor(options) {
2344
2353
  var _a, _b;
2345
2354
  super(options);
2346
- this.name = "lz4";
2347
- this.extensions = ["lz4"];
2348
- this.contentEncodings = ["x-lz4"];
2349
- this.isSupported = true;
2350
2355
  this.options = options;
2351
2356
  lz4js = lz4js || ((_b = (_a = this.options) == null ? void 0 : _a.modules) == null ? void 0 : _b.lz4js);
2352
2357
  if (!lz4js) {
@@ -2444,6 +2449,11 @@ var LZ4Compression = class extends Compression {
2444
2449
  var ZstdCodec;
2445
2450
  var zstd;
2446
2451
  var ZstdCompression = class extends Compression {
2452
+ name = "zstd";
2453
+ extensions = [];
2454
+ contentEncodings = [];
2455
+ isSupported = true;
2456
+ options;
2447
2457
  /**
2448
2458
  * zstd-codec is an injectable dependency due to big size
2449
2459
  * @param options
@@ -2451,10 +2461,6 @@ var ZstdCompression = class extends Compression {
2451
2461
  constructor(options) {
2452
2462
  var _a, _b;
2453
2463
  super(options);
2454
- this.name = "zstd";
2455
- this.extensions = [];
2456
- this.contentEncodings = [];
2457
- this.isSupported = true;
2458
2464
  this.options = options;
2459
2465
  ZstdCodec = (_b = (_a = this.options) == null ? void 0 : _a.modules) == null ? void 0 : _b["zstd-codec"];
2460
2466
  if (!ZstdCodec) {
@@ -2482,6 +2488,12 @@ var ZstdCompression = class extends Compression {
2482
2488
  var import_loader_utils7 = require("@loaders.gl/loader-utils");
2483
2489
  var lzo;
2484
2490
  var LZOCompression = class extends Compression {
2491
+ name = "lzo";
2492
+ extensions = [];
2493
+ contentEncodings = [];
2494
+ isSupported = false;
2495
+ // !isBrowser;
2496
+ options;
2485
2497
  /**
2486
2498
  * lzo is an injectable dependency due to big size
2487
2499
  * @param options
@@ -2489,10 +2501,6 @@ var LZOCompression = class extends Compression {
2489
2501
  constructor(options) {
2490
2502
  var _a, _b;
2491
2503
  super(options);
2492
- this.name = "lzo";
2493
- this.extensions = [];
2494
- this.contentEncodings = [];
2495
- this.isSupported = false;
2496
2504
  this.options = options;
2497
2505
  lzo = lzo || ((_b = (_a = this.options) == null ? void 0 : _a.modules) == null ? void 0 : _b.lzo);
2498
2506
  if (!lzo) {
@@ -2519,7 +2527,7 @@ var LZOCompression = class extends Compression {
2519
2527
 
2520
2528
  // dist/compress-on-worker.js
2521
2529
  var import_worker_utils = require("@loaders.gl/worker-utils");
2522
- var VERSION = true ? "4.2.0-alpha.4" : "latest";
2530
+ var VERSION = true ? "4.2.0-alpha.5" : "latest";
2523
2531
  var CompressionWorker = {
2524
2532
  id: "compression",
2525
2533
  name: "compression",