Detect compression automatically.