Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: WriterOptions makes chunking configuration error-prone #480

Open
wkalt opened this issue Jul 21, 2022 · 0 comments
Open

go: WriterOptions makes chunking configuration error-prone #480

wkalt opened this issue Jul 21, 2022 · 0 comments
Labels
feature New feature or request go

Comments

@wkalt
Copy link
Contributor

wkalt commented Jul 21, 2022

Currently most options for the golang writer are of the form "SkipXXX", such that the field defaults to false as is the behavior of go, and XXX is the defaulted configuration. This is not the case for the "Chunked" setting. If you don't specify Chunked=true, you are going to get an unchunked file out.

There are two issues with this:

  • It's better to default to a chunked, and indexed file, than an unchunked file. The current behavior is an oversight, more than intentional. Copies and transfers over network will be faster, space on disk less, and remote access is much improved. There are use-cases for unchunked files but a typical user on a decent system should prefer chunked. So IMO we're doing the wrong thing with the current default.
  • It is easy to make the mistake of setting compression to a value, without setting Chunked=true. Currently this has the effect of doing nothing - there's no chunks so there's nothing to compress. This should probably return an error at construction time.
@wkalt wkalt added the feature New feature or request label Jul 21, 2022
@jtbandes jtbandes added the go label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request go
Development

No branches or pull requests

2 participants