added Linux version of compression (untested)