()
| 31 | } |
| 32 | |
| 33 | function update() { |
| 34 | const loaded = Math.min(1.0, loadedBytes / lengthBytes); |
| 35 | const loadedPercent = loaded * 100.0; |
| 36 | const isIndeterminate = loadedBytes > lengthBytes; // Some compression is going on, so we can't know the real progress |
| 37 | |
| 38 | cb.update({ filename, isIndeterminate, loaded, loadedPercent, loadedBytes, lengthBytes }); |
| 39 | } |
| 40 | |
| 41 | const transform = new TransformStream({ |
| 42 | start() { |