Sensorineural hearing loss is associated with elevated hearing thresholds, reduced dynamic range, and loudness recruitment. Signal processing with dynamic range compression is used in hearing aids for presenting all the sounds comfortably within the limited dynamic range of the listener. A dynamic range compression technique, named as ‘sliding-band compression’, is proposed to overcome the shortcomings of the commonly used single-band and multiband compression techniques. The gain at each frequency index is calculated as a function of the short-time power in an auditory critical band centered at it. The technique avoids the attenuation of high-frequency components due to the presence of strong low-frequency components, which may occur in single-band compression. Further, it avoids distortions in the shape of spectral resonances and discontinuities during the resonance transitions, which may occur in multiband compression. The proposed technique was implemented for offline processing and compared with single-band compression and multiband compression using objective measures and different test inputs. For two-tone inputs, the single-band compression showed attenuation of the high-frequency tone with an increase in the level of the low-frequency tone. For swept-frequency single-tone input, the multiband compression showed errors in the tone amplitude of 1.5–2.5 dB for compression ratio of 2–10. Sliding-band compression did not show either type of error. The technique has been also implemented using a fixed-point processor for real-time processing with audio latency acceptable for face-to-face communication.