Constructor
new Pool(sizeopt, createWorkeropt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
size |
Number |
<optional> |
The size of the pool. Defaults to the number of CPUs
available. When this parameter is |
createWorker |
function |
<optional> |
A function that creates the decoder worker.
Defaults to a worker with all decoders that ship with geotiff.js. The A worker that uses a custom lzw decoder would look like this
The way the above code is built into a worker by the
|
Methods
(async) decode(buffer) → {Promise.<ArrayBuffer>}
Decode the given block of bytes with the set compression method.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
ArrayBuffer | the array buffer of bytes to decode. |
Returns:
the decoded result as a Promise
- Type
- Promise.<ArrayBuffer>