Class: Pool

pool~Pool(size)

Pool for workers to decode chunks of the images.

Constructor

new Pool(size)

Parameters:
Name Type Description
size Number

The size of the pool. Defaults to the number of CPUs available. When this parameter is null or 0, then the decoding will be done in the main thread.

Source:

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.

Source:
Returns:

the decoded result as a Promise

Type
Promise.<ArrayBuffer>