decompress() throws RangeError on empty input since 3.1.0
Calling decompress() with a zero-length buffer used to return an empty buffer. Since 3.1.0 it throws RangeError: Invalid offset. 3.0.4 still returns the empty buffer, so this is a regression. The failing call is in our streaming path, where the last chunk can be empty.
- Version
- 3.1.0 (3.0.4 works)
- Runtime
- Node 22, macOS
- Steps to reproduce
- Pass Buffer.alloc(0) to decompress()
- Expected
- An empty buffer, as in 3.0.4