WIP: added support for compression