Files
openpgpjs/test
Daniel Huigens a61cf1fcc8 Add config option to limit decompressed message size (#1933)
Since decompression can increase the memory usage non-linearly, add a
`config.maxDecompressedMessageSize` option to limit the decompressed
message size. By default it's set to `Infinity`, i.e. no limit.
Set the config option to a number of bytes to limit the size of data
that gets decompressed.

Also, handle backpressure in fflate fallback; don't start
(de)compressing more data if the (de)compressed data stream reader
hasn't asked for more data yet.

Finally, split the input chunks so that we don't overwhelm the output
stream with a lot of data if the input chunks are very large, as the
fflate fallback and WebKit's implementation of the native Compression
API seem to decompress the input chunks completely before producing an
output chunk, which doesn't give us a chance to cancel the
decompression if too much data is provided.
2025-12-09 11:51:51 +01:00
..
2025-11-13 14:53:20 +01:00
2025-10-17 16:41:01 +02:00