sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::Utils::Gzip#compress
Private: Generates a gzipped file based off of reference asset. Compresses the target asset's contents and puts it into a file with the same name plus a `.gz` extension in the same folder as the original. Does not modify the target asset. Returns nothing.
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/utils/gzip.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--Utils--Gzip-compress-for-pr
# Commit to gitgit add lib/sprockets/utils/gzip.rbgit commit -m "better docs for Sprockets::Utils::Gzip#compress"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--Utils--Gzip-compress-for-pr
hub pull-request
# Celebrate!