How to zip the standard output of a process?

Solution 1:

# your-command | gzip > your.gz

Solution 2:

You can do this with zip too

your-command | zip -q output.log.zip -

The output from your-command will be stored in the zip with afilename of -.