Merge pull request #280 from rxin/compress

Compression fixes
(cherry picked from commit c44db66483e9471d20852846d0dd78a252d8961d)

Signed-off-by: Reynold Xin <rxin@apache.org>