change boolean compress parameter to compress?, add compress? parameter to docstring