The performance of large applications tends to be poor due to the high overhead added by the swapping mechanism. The same problem may be found in highly-loaded multi-programmed systems where many of the running applications have to use the swap space in order to be able to execute at the same time. Furthermore, those large applications might not be able to run on laptop or home computers as their resources are usually smaller than the ones found in an office system. In this paper, we present a solution to both problems that we have implemented in the Linux kernel. The idea consists of compressing the swapped pages and keeping them in a swap cache whenever possible. We have tested this new mechanism with a set of real applications obtaining a significant performance improvement.