Closed manucorporat closed 3 years ago
Using native Compression Streams https://chromestatus.com/feature/5855937971617792 in chrome works as expected without issues, so I expect this is an real issue
Tested this out and I can see the issue. This is a very annoying edge case, I'll fix it in v0.7.1. Thanks for the bug report and the reproducible example.
EDIT: Just FYI, the quick workaround is to gunzip.push(chunk, chunkLength == remaining)
and not push with zero length at the end.
Should be fixed as v0.7.1. Changing the pen URL to https://cdn.jsdelivr.net/npm/fflate@0.7.1/umd/index.js
fixes the bug. Let me know if it isn't resolved.
Impressive! works like a charm
How to reproduce https://codepen.io/manucorporat/pen/PopXJgb?editors=1010
Notice the:
With this specific value, the ungzip breaks with
Error: invalid length/literal
, but works with other values, higher and lower.This variables allows to rechunk the file into smaller pieces.
This code is an example to minimally reproduce the issue, in production we got this error with random setups.
The problem Gunzip streaming API sometimes errors.