added support for compression