.functions: Improve `targz` #199

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
Owner

mathiasbynens commented Apr 29, 2013

Idea: Would be cool if targz foo would create foo.tar, then check its file size, and then use it to decide wether to use zopfli or gzip. Anything over, say, 50 MB, should probably use gzip. Zopfli is great for small files, but quickly becomes too slow as file size increases.

@alrra suggested using fewer Zopfli iterations (15 is the default) but I’m not sure about that, as it would minimize the benefit of using Zopfli.

@einars suggested using pigz (brew install pigz), the fast gzip-compatible multithreaded compressor™. Perhaps another check before falling back to gzip?

mathiasbynens added a commit that referenced this pull request Apr 29, 2013

.functions: Improve `targz`
* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.
Owner

mathiasbynens commented May 1, 2013

I guess this is pretty much finalized. Just waiting for mxcl/homebrew#19435 to be merged.

.functions: Improve `targz`
* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.

@mathiasbynens mathiasbynens deleted the targz branch May 1, 2013

mrkd added a commit to mrkd/dotfiles that referenced this pull request Apr 21, 2014

.functions: Improve `targz`
* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.

thorsten pushed a commit to thorsten/dotfiles that referenced this pull request Dec 12, 2014

.functions: Improve `targz`
* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.

dndhm added a commit to dndhm/dotfiles that referenced this pull request Nov 26, 2017

.functions: Improve `targz`
* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment