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
fwrite(): when col.names=FALSE, produce a gzip header, avoid a leak (#6853)
* fwrite(): emit gzip header even if !col.names
Previously, fwrite() emitted a raw DEFLATE stream if col.names was FALSE
(and thus headerLen was zero). Decompressing such files is possible, but
not trivial.
* Avoid a memory leak in fwrite(compress="gzip")
Previously, the zlib object zstrm was initialized whenever compression
was enabled, at least in order to calculate the buffer size for the
compressed data stream, but was only used for compression and
subsequently deallocated only when there was a header with column names.
Make sure to deflateEnd(&strm) even if there was no header.
* NEWS entry
* comment the source of this #endif for clarity
* Clean up the test file
Co-Authored-By: Michael Chirico <[email protected]>
* Report write() errno instead of just plain -1
Co-Authored-By: Michael Chirico <[email protected]>
---------
Co-authored-by: Michael Chirico <[email protected]>
Copy file name to clipboardExpand all lines: NEWS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
11
11
1. Custom binary operators from the `lubridate` package now work with objects of class `IDate` as with a `Date` subclass, [#6839](https://github.com/Rdatatable/data.table/issues/6839). Thanks @emallickhossain for the report and @aitap for the fix.
12
12
13
+
2.`fwrite(compress="gzip")` once again produces a gzip header when the column names are missing or disabled, [@6852](https://github.com/Rdatatable/data.table/issues/6852). Thanks @maxscheiber for the report and @aitap for the fix.
14
+
13
15
## NOTES
14
16
15
17
1. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/.
0 commit comments