Support for compression in writer