skydb/sky — pull request #209 by mkobetic (2014-05-30 15:47:16+00:00)
Title: Add support for compressed table copy

This PR adds optional `compression=gzip` parameter to the `table/:name/copy` endpoint. This allows sending the table pre-compressed (to support resource starved backup machines :-). It also adds Content-Disposition to the response with suggested filename to simplify curling the backup. Following curl command will save the compressed table file (table.gz) in the current directory (note the -OJ options):
```
vagrant@vagrant:~/src/sky$ curl -OJ localhost:8589/tables/orders_NQESTS_0/copy?compression=gzip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4349 0 4349 0 0 308k 0 --:--:-- --:--:-- --:--:-- 326k
curl: Saved to filename 'orders_NQESTS_0.gz'
```

Note that I explicitly avoided using Transfer-Encoding: gzip, because then it would be difficult to convince the client to not transparently decompress the received content on the fly.

@benbjohnson
/cc @snormore @charlescng