pifantastic/grunt-s3 — pull request #107 by giratikanon (2013-12-05 16:22:45+00:00)
Title: Fix bug so that sync verify works with gzip correctly

Currently, if you try to ```sync``` files with ```verify: true``` and ```gzip: true```, it compares the md5 of the gzipped remote file with the *non*-gzipped local file, so the hashes never match.

So if the local file is newer, ```sync``` will always upload, regardless of whether the content changed. For example, when a cron runs every minute and writes out a data file, it will always be uploaded to S3 even if the content is the same as the remote file.

This fixes the problem by just gzipping the local file before getting the md5 hash, assuming ```gzip: true```. It could be more efficient by caching the gzipped file and using it for upload later. In practice, even uploading 100+ files, it still takes just a second or two, the same as before.