ddeschenes-1 commented on PR #629: URL: https://github.com/apache/commons-compress/pull/629#issuecomment-2565719703
I'm somewhat ok with the current behavior of lingering filename/comment/extras/hcrc, but I's like a list of GzipParameters (GP), except that I know better and it would leak memory in some cases. If we had a limited list, it would be surprising to users to loose any of them. So I think I would opt for a callback like a "onNewGzipMember(GzipParameters parameters)". This callback doesn't have to be on constructor since the result of the constructor is necessarily to produce the first GP. So, we could have a .withMemberListener(Consumer<GzipParameters> listener) -> GzipCompressorInputStream, which preserves the api and avoids overloading again. The callback would be called synchronously in init() before returning (and no try catch). What do you think? -- 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]
