https://code.kx.com/trac/wiki/Cookbook/FileCompression

Simon Garland wrote a number of interesting scripts here:
https://code.kx.com/trac/browser/contrib/simon/compress


Note that compression is intended for q files not csv files


Let's test this:
q genandcompress.q

Now let's read in the files.
See that they are the same.

q readcompress.q

Now try to apply this stuff to partitioned tables.
In the following, we create partitioned tables and then compress
just one file.
We then call out to unix (this command may have to be changed
for your operating system) to get the size.

q genpartitioncompress.q

Later can move stockcompressed to stock for that partition
and still read in the table

mv stockcompressed partdb/2011.06.16/rantrade/stock

Then open up q and 
\l partdb

Implication: you can store a day of data uncompressed in a new partition,
then compress it column by column
and then move the result back into the partition directory.



