Read and write compressed .dta files using pigz
(a parallel implementation of gzip
).
-
These functions only work on Max OSX or Linux.
gzip
requires the command pigz. -
Syntax
-
Commands use/save/merge/joinby/append can be prefixed with
gzip
:use "mydata" gzipuse "mydata" gzipsave "mydata"
-
Any suffix is ignored. In other words, the following commands give the same result
gzipuse "/mydata.dta" gzipuse "/mydata.dta.gz" gzipuse "/mydata"
-
-
Timings on a 3Go file.
set rmsg on save "temp", replace *t = 21s gzipsave "temp", replace *t = 38s use "temp", clear *t = 10s gzipuse "temp", clear *t = 17s
Install using
net install "https://raw.githubusercontent.com/matthieugomez/compress.ado/master/"
If you have a version of Stata < 13, you need to install it manually
-
Click the "Download ZIP" button in the right column to download a zipfile.
-
Extract it into a folder (e.g. ~/SOMEFOLDER)
-
Run
cap ado uninstall compress net install compress, from("~/SOMEFOLDER")