-
Notifications
You must be signed in to change notification settings - Fork 986
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
control compression level for fwrite with gzip #5513
Conversation
I think compression ratio is something that fits well into use of a global option in R. So it can be applied to all packages using dt's fwrite compression. Then we don't need new argument. I am not saying to amend PR for that yet, just raising an idea for discussion. |
That was also my first thought, but I think I read smth about discouraging the introduction of new global options. A new global argument would also make everything cleaner since I do not throw any errors if a gzip_ratio is chosen with another or no compression. |
Global option looks less appealing to me since this is only used in one place / doesn't appear to correspond neatly to any R-side concept (it's just an argument to So we could do PS, (1) Why 'ratio'? The manual names the |
Ad (1) true that, |
R/fwrite.R
Outdated
@@ -10,6 +10,7 @@ fwrite = function(x, file="", append=FALSE, quote="auto", | |||
buffMB=8, nThread=getDTthreads(verbose), | |||
showProgress=getOption("datatable.showProgress", interactive()), | |||
compress = c("auto", "none", "gzip"), | |||
gzip_ratio = 0:9, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to use camel case rather than underline here
Codecov Report
@@ Coverage Diff @@
## master #5513 +/- ##
==========================================
- Coverage 99.51% 97.53% -1.98%
==========================================
Files 80 80
Lines 14773 14805 +32
==========================================
- Hits 14701 14440 -261
- Misses 72 365 +293
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Superseded by #6393, PTAL there. |
It looks like the only differences are:
Let's continue discussion there. |
Closes #5506
Still need to discuss the name of new argument and argument order for
fwrite