Closed donovan-h-parks closed 1 year ago
Proposed solution on Stack Overflow which is wonderful, but I'll leave this open since a change to gzp
might allow for a more elegant solution.
The stack overflow post was what I was going to suggest. I think abstracting this outside the library is appropriate in this case.
If you wanted to use your original Box approach though, contrary to what the docs say, you don't have to call .finish()
. If finish hasn't been called when Drop
is called, drop
will call finish. The downside is that it will eat the errors and just panic if something went wrong.
Thanks.
Hi,
Thank you for writing and maintaining
gzp
. I have found it extremely useful. I have run into one limitation with the interface. In my current application, I would like to optionally generate uncompressed output. This is especially true if the output is going to be written tostdout
. However, with the currentgzp
interface this is challenging since aParCompress
object must callfinish()
before going out of scope. As such, the typical solution below doesn't work:One can't call
finish()
in this situation. One solution would be to provide aParCompress<NoCompress>
type of something similar.Is there another way to address this?
Thanks, Donovan