1. A method for controlling real-time compression detection by a processor device in a computing environment, the method comprising: using a detection learning module for one of enabling and disabling real-time compression detection by maintaining a history of real-time compression detection success for sampled data; and enabling or disabling the real-time compression detection based on a detection benefit function derived from a set of calculated heuristics indicating the real-time compression detection success on input streams.