netz98/n98-magerun — pull request #113 by mzeis (2013-04-07 10:20:58+00:00)
Title: Added gzip compression option to db:dump and db:import command

Added feature as requested in #72.

It is possible to create and import gzipped dump files by specifying --compression="gzip" or -c gzip.

**To be discussed / done**
* I tested some variations (including/excluding table stripping, adding timestamp and so on) and it worked. Still I'd like somebody to verify everything works.
* Speaking about tests: I didn't implement unit tests. Yes, I admit it.
* The class for gzip is hardcoded in \N98\Magento\Command\Database\AbstractDatabaseCommand::getCompressor(). Do you have an opinion how to better handle this (configuration?)?

**If you want to implement more compressors**
* Add your own compression type (e.g. tar) to \N98\Magento\Command\Database\AbstractDatabaseCommand::getCompressor()
* Create your class in namespace N98\Magento\Command\Database\Compressor extending AbstractCompressor (see gzip implementation).