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; 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; calculating the detection benefit function based on at least one heuristic score; calculating a real-time compression detection histogram; and updating a real-time compression detection interval according to a real-time compression detection histogram.