tomasilluminati commented on PR #777:
URL: https://github.com/apache/commons-compress/pull/777#issuecomment-4827865784

   @garydgregory 
   Yeah, I'm with you on the footgun. The ratio is genuinely hard to tune and 
easy to get wrong, exactly the "works for bar, blows up on foo" trap, so I'd 
rather not hand people a sharp tool they can't aim.
   
   Nice pointer on setAfterRead, hadn't thought of it. That actually means 
neither piece needs a new class. The size cap is setMaxCount plus a throwing 
onMaxCount, and if the ratio ever comes back it can ride along as a 
setAfterRead consumer on the same BoundedInputStream.
   
   So my lean is to keep it minimal, wire an absolute decompressed-size limit 
into CompressorStreamFactory via BoundedInputStream, drop the bomb class and 
the exception, and leave the ratio out for now. We can always document it as a 
recipe later.
   
   Happy to let it simmer and hear what @ppkarwasz thinks before I change 
anything.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to