compress without reading into memory