Finally got compression to work (using bzip2, zlib is still failing...)