This disclosure involves the combination of data compression and
decompression with a virtual memory system. A number of computer systems
are discussed, including so-called embedded systems, in which data is
stored in a storage device in a compressed format. In response to a
request for data by a central processing unit (CPU), the virtual memory
system will first determine if the requested data is present in the
portion of main memory that is accessible to the CPU, which also happens
to be where decompressed data is stored. If the requested data is not
present in the decompressed portion of main memory, but rather is present
in a compressed format in the storage device, the data will be transferred
into the decompressed portion of main memory through a demand paging
operation. During the demand paging operation, the compressed data will be
decompressed. Likewise, if data is paged out of the decompressed portion
of main memory, and that data must be saved, it can also be compressed
before storage in the storage device for compressed data.