1. A method comprising: providing a near and far memory coupled to a processor, wherein said near memory is faster than said far memory and said near memory is backed by said far memory; compressing data to be stored in said near memory using a codec; compacting said compressed data; and storing said compacted data so that said compressed and compacted data's footprint is less than that of compressed data before compaction.