You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some reason why I shouldn't treat the compression step as a WriteCloser? Why does that return a public struct instead of an interface, like how decompression does?
Thanks!
The text was updated successfully, but these errors were encountered:
Yes we could return an io.WriteCloser, though it would mean the public attribute CompressionLevel would not be exposed anymore
If you want to use a io.WriteCloser, you can just do a:
varzstdWriter io.WriteCloser=NewWriter(w)
If you are talking about consistency, it's just to provide the attribute above ^ (for now, for future, we could also provide additional methods / attributes)
I'm not sure I understand. Why is the CompressionLevel public? Am I permitted to change it in the middle of writing?? (if so, that's awesome). If it's unchangeable then why public?
That would definitely make sense to convert it to a method though to make the read-only explicit.
Since this is technically an API change though, we'll need to wait to switch to a major (2.x)
Is there some reason why I shouldn't treat the compression step as a WriteCloser? Why does that return a public struct instead of an interface, like how decompression does?
Thanks!
The text was updated successfully, but these errors were encountered: