No, the size is checked after every chunk returned by the deflate stream and if the threshold is exceeded the deflate stream and the connection are closed.
@lpinca Hi, there are two farther questions:
zlib?threshold means min size to compress in docs, do you mean maxPayload instead?maxPayload.@lpinca Thank you!
I see. So the maxPayload option is a limit to data after uncompress, not for original data, I think it's good to write it in docs (maybe there could be an option for orginal data limit? I'm not sure).
The maxPayload limit is checked multiple times:
maxPayload.
Most helpful comment
maxPayload.