Patent ID: 7071999

Claim:
A method for controlling a memory in a digital system, comprising: (a) dividing the memory into a plurality of memory blocks, wherein each memory block has a same size as that of a neighboring memory block; (b) defining at least one of the memory blocks as a compression/decompression region; (c) assigning compression priorities to the rest of the memory blocks except the at least one of the memory blocks defined as the compression/decompression region; (d) making the memory blocks deal with an external data received according to an external command, and carrying out compression/decompression of data required in the dealing with the external data at the compression/decompression region according to the compression priorities; and (e) recording a number of access times data in each memory block is accessed, measuring access frequencies of the memory blocks based on the recorded number of access times, and resetting the assigned compression priorities.