During a program’s runtime, the stack and data segments of the main memory often contain much redundancy, which makes them good candidates for compression. Compression and decompression however require either extra hardware or substantial processing resources. This paper presents a new approach in which a mostly software solution is suggested but without the processing power penalty that usually accompanies such a solution. This is achieved by not compressing all the memory all of the time. The suggested method is to identify the current working set and to leave it uncompressed for faster access. Pages that are not in the working set may be compressed during the CPU’s idle time. Also, compression is only performed during phases which exhibit good spatial locality. These phases are identified by detecting changes in the program’s working set. By comparing the current working set’s “signature” with the signature at the end of the previous instruction window, a difference pa...