constructor() {
    const unpacker = new PNGUnpacker();

    this.readable = new ReadableStream({
      start(controller) {
        unpacker.onChunk = chunk => controller.enqueue(chunk);
        unpacker.onClose = () => controller.close();
      }
    });

    this.writable = new WritableStream({
      write(uint8Array) {
        unpacker.addBinaryData(uint8Array);
      }
    });
  }
This transform stream unpacks PNG chunks out of binary data.
It can be consumed by a ReadableStream's pipeThrough method.