Patent ID: 9720821
Date: 2017-08-01
CPC Classifications: G06F,H03M

Claim:
1. An adaptive compression data storing method for non-volatile memories, comprising the steps of: A. receiving a first data which is divided from an original data that is to be stored in the non-volatile memory, wherein a size of the first data is not greater than that of a page in a non-volatile memory and the original data is formed by a plurality of first data that is continuously received; B. dividing the first data into at least two basic units if the size of the first data before being compressed is greater than a predetermined size, wherein at least one of the basic units before being compressed is equal to the predetermined size; C. compressing the basic units or the first data; D. connecting and padding the compressed basic units or the compressed first data to form a second data so that the second data has a size as an integral multiple of the predetermined size; E. storing the second data in a buffer; F. repeating step A to step E until each of the plurality of the first data which forms the original data is received, wherein a plurality of second data is formed while step A to step E are repeated; G. searching for at least two of the second data that can be combined to have a size of one page in the buffer; H. combining the at least two of the second data in the buffer as a third data, or padding the second data or connecting and padding the second data in the buffer as a third data if each of the plurality of the first data which forms the original data is received, wherein a size of the third data is the same as that of one page; I. programming the third data to a specific page in the non-volatile memory; and J. processing step A if not every one of the plurality of the first data which forms the original data is received, wherein 0 is used as an element for padding.