Connect's compress with optional flush method