Method, compression encoding device, and compression / decompression system

By buffering unmatched strings and using index-based compression, the method efficiently compresses strings shorter than the minimum matching length, enhancing storage efficiency in data storage devices.

JP2026043316APending Publication Date: 2026-03-12KIOXIA CORP
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

Existing dictionary-based compression methods face inefficiencies when compressing character strings shorter than the minimum matching length, leading to increased data volume and strain on data storage devices.

Method used

A method and system that buffer unmatched strings in a character buffer and output index information when a match is found, allowing efficient compression of strings shorter than the minimum matching length by using a combination of dictionary-based compression and entropy coding.

Benefits of technology

Improves compression efficiency by effectively compressing strings shorter than the minimum matching length, reducing data volume and enhancing storage capacity utilization in data storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026043316000001_ABST
    Figure 2026043316000001_ABST
Patent Text Reader

Abstract

To provide a method that enables compressing character strings that are shorter than the minimum matching length of dictionary compression. [Solution] According to an embodiment, the method includes: if the length of an input string is equal to or greater than a predetermined length, outputting, as compressed data, information indicating the result of a comparison between the input string and a string that appeared in the past; if the length of the input string is less than the predetermined length, outputting the input string as an unmatched string; determining whether the output unmatched string matches any of the unmatched strings in a buffer in which the unmatched strings that appeared in the past are stored; if there is a match, outputting, as compressed data, a first data set that includes flag information indicating the match and index information that indicates the entry in the buffer in which the mismatched string determined to match is stored; if there is no match, storing the output unmatched string in the buffer, and outputting, as compressed data, a second data set that includes flag information indicating the mismatch and the output unmatched string.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] SUMMARY OF THE INVENTION Embodiments of the present invention relate to a method, an encoding device and a compression / decompression system. [Background technology]

[0002] In data centers, for example, when storing large amounts of user data, storing the original data in its original form would put a strain on the capacity of data storage devices such as HDDs (hard disk drives) and SSDs (solid state drives), increasing costs. Therefore, data is generally reduced in size by using lossless compression.

[0003] A typical data reduction technique is a combination of dictionary-based compression and entropy coding. Gzip's dictionary-based compression, a representative example of this compression technique, uses a dictionary that stores previously occurring data sequences. It searches the dictionary for a data sequence matching the data sequence to be compressed. If a matching data sequence is found in the dictionary, the data sequence to be compressed is converted into a dictionary address and matching length. The dictionary address and matching length, or the mismatched data sequence, are then entropy-coded to compress the data and reduce the data volume. This data volume reduction allows more data to be written to a data storage device. Here, the dictionary address refers to the location in the dictionary where the matching data sequence is stored, and is referred to as the matching distance. The matching length indicates the length of the matching data sequence. The matching length is expressed, for example, as the number of characters (each character is equivalent to 8 bits).

[0004] Incidentally, when dictionary matches in dictionary-based compression (LZSS: Lempel-Ziv-Storer-Syzmanski) are expressed as (match length, match distance), for match lengths between 2 (2 characters: 16 bits) and 3 (3 characters: 24 bits), outputting mismatched characters as is often less data-intensive. For example, assuming a dictionary size of 4KB and a maximum match length of 256, a dictionary match requires a total of 23 bits (match information (1 bit), match length (8 bits), match distance (12 bits)), while for match lengths of 2 or less, the data volume actually increases. For this reason, dictionary-based compression often sets the minimum match length to 3 or 4. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] U.S. Patent No. 10,187,081 [Patent Document 2] U.S. Patent No. 5,373,290 [Patent Document 3] US Patent Application Publication No. 2003 / 0179114 Summary of the Invention [Problem to be solved by the invention]

[0006] One embodiment of the present invention provides a method, a compression encoding device, and a compression / decompression system that are capable of compressing character strings that are shorter than the minimum matching length of dictionary compression. [Means for solving the problem]

[0007] According to an embodiment, a method is a method for controlling a non-volatile memory, the method comprising: if a length of an input string is equal to or greater than a predetermined length, outputting, as compressed data, information indicating a comparison result between the input string and a string that appeared in the past; if the length of the input string is less than the predetermined length, outputting the input string as an unmatched string; determining whether the output unmatched string matches any of the unmatched strings in a buffer in which the unmatched strings that appeared in the past are stored; if the output unmatched string matches any of the unmatched strings in the buffer, outputting, as compressed data, a first data set including flag information indicating the match and index information indicating an entry in the buffer in which the mismatched string determined to match is stored; if the output unmatched string does not match any of the unmatched strings in the buffer, storing the output unmatched string in the buffer; outputting, as compressed data, a second data set including flag information indicating the mismatch and the output unmatched string; and saving data based on the output compressed data in the non-volatile memory. [Brief explanation of the drawings]

[0008] [Figure 1] FIG. 1 is a diagram showing an example of the configuration of a memory system according to a first embodiment. [Figure 2] FIG. 2 is a diagram showing an example of the configuration of a compression unit in the memory system of the first embodiment. [Figure 3] FIG. 3 is a diagram for explaining an outline of the operation of a compression unit in the memory system of the first embodiment. [Figure 4] 4 is a diagram for further explaining an example of the outline of the operation of the compression unit in the memory system of the first embodiment. FIG. [Figure 5] 10 is a flowchart showing the operation procedure of a compression unit in the memory system of the first embodiment. [Figure 6] FIG. 2 is a diagram showing an example of the configuration of a decompression unit in the memory system of the first embodiment. [Figure 7] FIG. 3 is a diagram for explaining an outline of the operation of a decompression unit in the memory system of the first embodiment. [Figure 8]10 is a flowchart showing the operation procedure of a decompression unit in the memory system of the first embodiment. [Figure 9] 10 is a flowchart showing the operation procedure of a compression unit in the memory system of the second embodiment. [Figure 10] 10 is a flowchart showing the operation procedure of a decompression unit in the memory system of the second embodiment. [Figure 11] FIG. 10 is a diagram showing an example of the configuration of a compression unit in the memory system of the third embodiment. [Figure 12] FIG. 11 is a diagram showing the concept of updating a character buffer in the memory system of the third embodiment. [Figure 13] 10 is a flowchart showing the operation procedure of a compression unit in the memory system of the third embodiment. [Figure 14] FIG. 10 is a diagram showing an example of the configuration of a decompression unit in the memory system of the third embodiment. [Figure 15] 10 is a flowchart showing the operation procedure of a decompression unit in the memory system of the third embodiment. [Figure 16] FIG. 13 is a diagram showing an example of the configuration of a compression unit in the memory system according to the fourth embodiment. [Figure 17] FIG. 10 is a diagram showing the concept of updating a character buffer in the memory system of the fourth embodiment. [Figure 18] 10 is a flowchart showing the operation procedure of a compression unit in the memory system of the fourth embodiment. [Figure 19] FIG. 10 is a diagram showing an example of the configuration of a decompression unit in a memory system according to a fourth embodiment. [Figure 20] 10 is a flowchart showing the operation procedure of a decompression unit in the memory system of the fourth embodiment. [Figure 21] FIG. 13 is a diagram showing an example of the configuration of a compression unit in the memory system according to the fifth embodiment. [Figure 22] FIG. 13 is a diagram showing the concept of updating a character buffer in the memory system of the fifth embodiment. [Figure 23] 13 is a flowchart showing the operation procedure of a compression unit in the memory system of the fifth embodiment. [Figure 24]FIG. 13 is a diagram showing an example of the configuration of a decompression unit in a memory system according to a fifth embodiment. [Figure 25] 13 is a flowchart showing the operation procedure of a decompression unit in the memory system of the fifth embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0009] Hereinafter, embodiments will be described with reference to the drawings.

[0010] (First embodiment) First, the first embodiment will be described.

[0011] Fig. 1 is a diagram showing an example of the configuration of a memory system 1 according to the first embodiment. Fig. 1 also shows an example of the configuration of an information processing system including the memory system 1 and a host 2 to which the memory system 1 is connected as storage. The host 2 is an information processing device such as a server or a personal computer.

[0012] The memory system 1 includes a memory controller 11 and a flash memory 12. Here, an example is shown in which the memory system 1 is realized as an SSD. The memory system 1 is not limited to an SSD, and can be realized as various types of data storage devices. In other words, the memory system 1 can be equipped with various types of storage media, not limited to the flash memory 12.

[0013] The memory controller 11 is a device that controls the overall operation of the memory system 1. The memory controller 11 includes a processor 111, a host interface unit 112, a memory interface unit 113, a compression unit 114, a decompression unit 115, and an ECC (error check and correct) unit 116.

[0014] The processor 111 executes programs such as firmware to realize various processes that should be executed by the memory controller 11. The various processes that should be executed by the memory controller 11 include a write process that writes data to the flash memory 12 in response to a write command from the host 2, and a read process that reads data stored in the flash memory 12 in response to a read command from the host 2. Here, an example is shown in which the various processes that should be executed by the memory controller 11 are realized by the processor 111 executing firmware, but they may also be realized by dedicated hardware built into the memory controller 11, such as an electric circuit.

[0015] The host interface unit 112 controls communication with the host 2 in accordance with a predetermined communication standard. The memory interface unit 113 controls writing of data to the flash memory 12 and reading of data from the flash memory 12.

[0016] The compression unit 114 generates compressed data by compressing write data that is requested by a write command to be written to the flash memory 12. The decompression unit 115 acquires read data by decompressing compressed data that corresponds to read data that is requested by a read command to be read from the flash memory 12. In other words, the memory system 1 of the first embodiment has a compression / decompression system that compresses and decompresses data.

[0017] The ECC unit 116 performs error correction processing on the compressed data generated by the compression unit 114 and an entropy coding unit (not shown). Specifically, upon receiving a write command, the ECC unit 116 generates an error correction code for detecting and correcting errors in case such errors occur in the compressed data to be written to the flash memory 12. The processor 111 is then configured to write the error correction code to the flash memory 12 via the memory interface unit 113. That is, the processor 111 is configured to write data based on the compressed data generated by the compression unit 114 and an entropy coding unit (not shown) to the flash memory 12 via the memory interface unit 113. Furthermore, upon receiving a read command from the host 2, the processor 111 reads data based on the received read command from the flash memory 12 via the memory interface unit 113. The ECC unit 116 performs error correction processing on the read data. That is, the ECC unit 116 uses the error correction code to check whether any errors have occurred in the compressed data read from the flash memory 12, and if an error is detected, corrects the error. The read data that has undergone error correction processing is input as compressed data to the decompression unit 115 by the processor 111, and the decompression unit 115 decompresses the input compressed data. In response to a read command from the host 2, the processor 111 transmits the decompressed data to the host 2. In other words, in response to a read command from the host 2, the processor 111 is configured to decompress data based on the data read from the flash memory 12 and transmit the decompressed data to the host 2.

[0018] FIG. 2 is a diagram showing an example of the configuration of the compression unit 114 in the memory system 1 of the first embodiment.

[0019] The compression unit 114 of the first embodiment includes a dictionary-based compression unit 21, a match searcher 22, a character buffer 23, a character match / mismatch selector 24, and a bit packing unit 25.

[0020] The dictionary-based compression unit 21 stores previously input character strings as dictionary data in a buffer (not shown) and searches the dictionary data stored in the buffer for dictionary data that matches the input character string. Here, the input character string is also referred to as input data to be compressed. If a character string identical to the input character string is found in the dictionary data, the dictionary-based compression unit 21 outputs information indicating a match, the matching length, and the matching distance. On the other hand, if the input character string is not found in the dictionary, the dictionary-based compression unit 21 outputs information indicating a mismatch and an unmatched character string in dictionary compression. Here, the unmatched character string in dictionary compression refers to the unmatched character string output from the dictionary-based compression unit 21, which is the character string input to the dictionary-based compression unit 21. A typical algorithm is, for example, LZSS, an improved version of LZ77.

[0021] Based on the input dictionary-compressed unmatched character string and buffer information related to character strings stored in character buffer 23, match finder 22 determines whether a character string matching the dictionary-compressed unmatched character string exists in character buffer 23. If a character string exists, match finder 22 outputs information indicating a match (match / mismatch information) and an index (match idx) assigned to the matched character string in character buffer 23. If a character string does not exist, match finder 22 outputs information indicating a mismatch (match / mismatch information).

[0022] Character buffer 23 stores dictionary-compressed unmatched strings that have appeared in the past, with a length ranging from 1 to (the minimum dictionary-compression match length - 1), and assigns an index to each string. More specifically, an index is assigned to each entry in character buffer 23, where a string is stored one by one. Basically, a small index is assigned to a newly input string. Character buffer 23 outputs the string with the assigned index to match searcher 22 as buffer information.

[0023] Character buffer 23 receives from match searcher 22 match / mismatch information for the unmatched strings of the lexicographically compressed strings and, in the case of a match, the index of the string, i.e., the index of the entry in which the string is stored. If the match / mismatch information indicates a match, character buffer 23 shifts the strings stored in entries from index "0" to (index received from match searcher 22 - 1) to the entry at (index + 1), and updates character buffer 23 so that the string stored in the entry at (index received from match searcher 22) is moved to the entry at index "0". If there is a mismatch, character buffer 23 increments (+1) the indexes of all strings in character buffer 23. In other words, all strings are shifted to the entry at (index + 1). If character buffer 23 is full, the string stored in the entry at (the highest index) is discarded. After shifting all strings, character buffer 23 stores the most recently encountered unmatched string of lexicographically compressed string in the entry at index "0".

[0024] Character match / mismatch selector 24 receives match / mismatch information and a match index from match finder 22, and receives an unmatched character string from dictionary-based compression unit 21. If the match / mismatch information received from match finder 22 indicates a match, character match / mismatch selector 24 outputs, as encoded data, a data set including information indicating a mismatch in dictionary-based compression unit 21, information indicating a match in character buffer 23, and the matching index in character buffer 23. If the match / mismatch information received from match finder 22 indicates a mismatch, character match / mismatch selector 24 outputs, as encoded data, a data set including information indicating a mismatch in dictionary-based compression unit 21, information indicating a mismatch in character buffer 23, the number of characters in the unmatched character string in dictionary compression, and the unmatched character string in dictionary compression.

[0025] The bit packing unit 25 receives the match information from the dictionary compression unit 21 and the coded data from the character match / mismatch selector, performs bit packing on the data as a compressed stream, and outputs the result to the outside.

[0026] Here, an example is shown in which the compression unit 114 performs dictionary compression. Generally, a compression method that combines dictionary compression and entropy coding is adopted. The compressed stream output from the compression unit 114 is entropy coded by an entropy coding unit (not shown in FIG. 1) and output as compressed data. The compressed data output from the entropy coding unit is input to the ECC unit 116.

[0027] Here, an overview of the operation of the compression unit 114 in the memory system 1 of the first embodiment having the above-described configuration will be described with reference to FIG.

[0028] The compression unit 114 buffers dictionary-compressed mismatched character strings by a predetermined length, and when an input dictionary-compressed mismatched character string matches any of the character strings in the buffer, it outputs an index of that string, thereby improving compression efficiency.

[0029] First, we will explain the operation when a string matching an unmatched string in dictionary compression is found in the buffer. For example, assume that character buffer 23 stores "13_09" (index "0"), "00_43" (index "1"), "E8_D0" (index "2"), . . . , "00_42" (index "15"). Also assume that input string "00_43" is input to dictionary compression unit 21 and output as an unmatched string in dictionary compression. For example, assume that the minimum matching length for dictionary compression is three characters or more. The unmatched string in dictionary compression is input to match searcher 22, which searches character buffer 23 for "00_43". In this example, since a matching string is found, match searcher 22 outputs its index "1" and information indicating a match to character match / mismatch selector 24.

[0030] Because it matches the character string in character buffer 23, character match / mismatch selector 24 outputs information indicating the match and its index information to bit packing unit 25. Bit packing unit 25 packs the input data as a compressed stream and outputs it. Meanwhile, because a character string that matches the mismatched character string in dictionary-based compression has been found, character buffer 23 updates it so that the matching character string is moved to the beginning. With this update, index "0" becomes "00_43," index "1" becomes "13_09," index "2" becomes "E8_D0," ..., and index "15" becomes "00_42." In this way, indexes with values ​​smaller than the index of the matching "00_43" are incremented (+1), and the index of the matching character string "00_43" becomes "0."

[0031] Next, we will explain the operation when a string matching the mismatched string from dictionary compression cannot be found in the buffer. For example, when "00_00" is input, the match searcher 22 outputs mismatch information. Upon receiving the mismatch information, the character match / mismatch selector 24 outputs the mismatched string "00_00" from dictionary compression, information indicating the mismatch, and the number of mismatched characters to the bit packing unit 25. The bit packing unit 25 packs the input data as a compressed stream and outputs it. Meanwhile, the character buffer 23 sets the "00_00" input together with the mismatch information as index "0," increments the indexes of the other strings (+1), and discards the string at index "15."

[0032] In this way, the compression unit 114 can compress the dictionary-compressed mismatched character string when the dictionary-compressed mismatched character string is shorter than the minimum matching length of the dictionary-compressed character string, thereby improving compression efficiency.

[0033] Next, referring to FIG. 4, the outline of the operation of compression unit 114, including updating of character buffer 23, will be further explained using a specific example of a character string in character buffer 23.

[0034] If a non-matching string from dictionary compression exists in the character buffer 23, i.e., if a hit occurs, the match searcher 22 outputs a data set including information indicating a hit (match / non-match information) of 1 bit "1" and its index.

[0035] On the other hand, if the dictionary-compressed mismatched character string does not exist in the character buffer 23, i.e., if there is no hit, the match searcher 22 outputs a data set including information indicating no hit (match / mismatch information) of 1 bit "0", the number of characters (m: m is from 1 to (minimum match length of dictionary compression - 1)), and the dictionary-compressed mismatched character string.

[0036] Assuming that "STU" is input from dictionary compression unit 21 as an unmatched character string for dictionary compression, "STU" exists in character buffer 23, so there is a hit. Match searcher 22 outputs a data set including match / mismatch information "1" indicating a match and an index "3." In this case, character buffer 23 removes the matched character string "STU" from index "3" and moves it to the first index "0." The indexes "0" to "2" before "STU" was moved are each incremented (+1).

[0037] Next, assume that "ast" is input as an unmatched string of dictionary-based compression that does not exist in character buffer 23. Since it does not exist in character buffer 23 and there is no hit, match searcher 22 outputs a data set that includes match / mismatch information "0" indicating a mismatch, the number of characters "3," and the unmatched string of dictionary-based compression "ast." In this case, character buffer 23 stores the first index "0" and increments (+1) the indexes of the other strings. In other words, the other strings are shifted down one by one.

[0038] The above is an outline of the operation of the compression unit 114 in the memory system of the first embodiment. When a character string shorter than the minimum match length is output from the dictionary-based compression unit 21 as a dictionary-compressed mismatched character string, and if the dictionary-compressed mismatched character string exists in the character buffer 23, the compression unit 114 can compression-encode the dictionary-compressed mismatched character string into a few-bit data set including mismatch information and an index. This improves the compression efficiency of the compression unit 114 of the first embodiment.

[0039] FIG. 5 is a flowchart showing the operation procedure of the compression unit 114 in the memory system of the first embodiment.

[0040] The dictionary compression unit 21 performs dictionary compression on input data (S101). If there is a dictionary match (S102: YES), the bit packing unit 25 outputs the information output from the dictionary compression unit 21 as compressed data (S111).

[0041] If there is no dictionary match (S102: NO), match finder 22 compares the m-character dictionary-compressed mismatched string with the string in X (X is a natural number equal to or greater than 1) rows of character buffer 23 (S103). If the dictionary-compressed mismatched string exists in character buffer 23 (S104: YES), match finder 22 outputs a data set including match / mismatch information "1" indicating a match and an index "T (T is 0 to X-1)" of the entry storing the string that matches the dictionary-compressed mismatched string (S105).

[0042] Character buffer 23 moves the character string stored in the entry with index "T" to the entry with index "0" (S106). At that time, character buffer 23 shifts the character strings stored in the entries with indexes "0" to "T-1" so that their indexes become +1 (S107).

[0043] If the dictionary-compressed mismatched character string does not exist in the character buffer 23 (S104: NO), the match searcher 22 outputs a data set including match / mismatch information "0" indicating a mismatch, the number of characters "m", and the dictionary-compressed mismatched character string (S108).

[0044] Character buffer 23 stores the non-matching character strings obtained by dictionary compression at index "0" (S109). At that time, character buffer 23 shifts all stored character strings so that their indexes become +1 (S110).

[0045] If there is no dictionary match, the bit packing unit 25 outputs the information output from the match searcher 22 as compressed data (S111).

[0046] The compression unit 114 determines whether or not data to be compressed remains (S112), and if so (S112: YES), the process returns to S101 and executes a series of processes starting with dictionary-based compression of the input data by the dictionary-based compression unit 21. If no data remains (S112: NO), the compression unit 114 ends the compression process.

[0047] Next, a detailed description will be given of the decompression unit 115 in the first embodiment. Fig. 6 is a diagram showing an example of the configuration of the decompression unit 115 in the first embodiment.

[0048] The decompression unit 115 of the first embodiment has a compressed stream buffer 31, a dictionary match / mismatch determination unit 32, a character buffer match / mismatch determination unit 33, a clipping amount calculation unit 34, a character buffer 35, and a dictionary-based decompression unit 36.

[0049] The compressed stream buffer 31 is a buffer that receives and stores a compressed stream from an external source. When the compressed stream buffer 31 receives a cutout amount from the cutout amount calculation unit 34, it truncates the compressed stream from the beginning by the cutout amount.

[0050] The dictionary match / mismatch determination unit 32 obtains the compressed data stored in the compressed stream buffer 31 and first reads the first bit. If the value of this bit is "1", the following data is dictionary match information. The dictionary match / mismatch determination unit 32 then reads Y bits as dictionary match information. Y is the number of bits indicating the match length and match distance in dictionary compression. The match length indicates the number of characters in the matching string. The match distance indicates the starting position of the matching string in the dictionary. The dictionary match / mismatch determination unit 32 outputs the dictionary match information to the dictionary decompression unit 36.

[0051] On the other hand, if the value of the first bit is "0", the following data is dictionary mismatch information. The dictionary mismatch information is information including (i) the index of the entry in character buffer 35 that stores the string that matches the mismatched string in dictionary compression, or (ii) the number of characters in the mismatched string in dictionary compression and the mismatched string in dictionary compression. Dictionary match / mismatch determination unit 32 outputs the dictionary mismatch information to character buffer match / mismatch determination unit 33.

[0052] If the value of the first bit is "1", that is, if there is a dictionary match, the dictionary match determination unit 32 outputs "1+Y" to the cutout amount calculation unit 34. On the other hand, if the value of the first bit is "0", that is, if there is a dictionary mismatch, the dictionary match determination unit 32 outputs "1" to the cutout amount calculation unit 34.

[0053] Character buffer match / mismatch determination unit 33 first reads the first bit of the dictionary mismatch information received from dictionary match / mismatch determination unit 32. This one bit is character buffer match / mismatch information. If it is "1", the mismatched string obtained by dictionary compression matches one of the strings in character buffer 35. In this case, character buffer match / mismatch determination unit 33 then reads [log2(X)] bit, where X is the depth (number of levels) of character buffer 35. [log2(X)], enclosed in [ ], is a ceiling function that rounds up the decimal point of log2(X), and [log2(X)] bit is the number of bits required to represent X numbers from 0 to X-1 in binary. The value of [log2(X)] bit is the index of the entry that stores the string that matches the mismatched string obtained by dictionary compression among the X entries in character buffer 35.

[0054] On the other hand, if the character buffer match / mismatch information is "0", the mismatched string in the dictionary-based compression is a string that is not in character buffer 35. In this case, character buffer match / mismatch determination unit 33 then reads [log2(N-1)] bits. N is the minimum match length in the dictionary-based compression. [log2(N-1)] is also a ceiling function, and [log2(N-1)] bits is the number of bits required to represent N-1 numbers from 1 to N-1 in binary. The value of [log2(N-1)] bits is the number of characters in the mismatched string in the dictionary-based compression. Character buffer match / mismatch determination unit 33 sets the value of [log2(N-1)] bits, i.e., the number of characters in the mismatched string in the dictionary-based compression, to m, and then reads m*8 bits. The value of m*8 bits is the mismatched string in the dictionary-based compression.

[0055] Character buffer match / mismatch determination unit 33 outputs character buffer match / mismatch information (“1” or “0”) and the acquired data (index, or the number of characters and the mismatched character string obtained by dictionary compression) to character buffer 35.

[0056] Furthermore, when the character buffer match / mismatch information is "1", character buffer match / mismatch determination unit 33 outputs 1+[log2(X)] to clipping amount calculation unit 34. On the other hand, when the character buffer match / mismatch information is "0", character buffer match / mismatch determination unit 33 outputs 1+[log2(N-1)]+m*8 to clipping amount calculation unit 34.

[0057] The cutout amount calculation unit 34 adds up the value received from the dictionary match / mismatch determination unit 32 and the value received from the character buffer match / mismatch determination unit 33 and outputs the sum to the compressed stream buffer 31 as the cutout amount.

[0058] Character buffer 35 receives character buffer match / mismatch information from character buffer match / mismatch determination unit 33. If the received character buffer match / mismatch information is "1", the other data received from character buffer match / mismatch determination unit 33 is the index of an entry in character buffer 35. In this case, character buffer 35 reads the character string stored in the entry at that index and outputs it to dictionary-based decompression unit 36 ​​as a dictionary-based compressed mismatch character string.

[0059] Furthermore, character buffer 35 moves the character string stored in the entry with index "T" received from character buffer match / mismatch determination unit 33 to the entry with index "0", where T is an integer equal to or greater than 1. At that time, character buffer 35 shifts the character strings stored in the entries with index "0" through index "T-1" so that the indexes become +1.

[0060] On the other hand, if the character buffer match / mismatch information is "0", the other data received from character buffer match / mismatch determination unit 33 is a character buffer mismatch string (number of characters and mismatched string from dictionary compression). In this case, character buffer 35 outputs the mismatched string from dictionary compression to dictionary decompression unit 36.

[0061] Furthermore, the character buffer 35 stores the character string that does not match the character buffer in the entry with index 0. At that time, the character buffer 35 shifts all other character strings so that their indexes become +1.

[0062] In other words, character buffer 35 of decompression unit 115 stores unmatched strings of dictionary-based compression and moves strings within character buffer 35 in a manner that reproduces the way character buffer 23 of compression unit 114 stores unmatched strings of dictionary-based compression and moves strings within character buffer 23.

[0063] Referring to Figure 7, an overview of the operation of the decompression unit 115 in the memory system of the first embodiment having the above configuration, including updating of the character buffer 35, will be explained using specific examples such as compressed streams and character strings in the character buffer 35.

[0064] Here, it is assumed that the following compressed streams are input: "0 (1 bit), 1 (1 bit), 1 (4 bits), 0 (1 bit), 0 (1 bit), 2 (2 bits), AB_CD (16 bits), 1 (1 bit), 3 (12 bits), 8 (8 bits)".

[0065] The dictionary match / mismatch determination unit 32 first reads the first bit. Because this first bit is "0," it is clear that this is dictionary mismatch information. Therefore, the next bit is match / mismatch information from the character buffer 35.

[0066] Character buffer match / mismatch determination unit 33 reads this match / mismatch information. Because the match / mismatch information is "1", it is clear that an index follows next. Here, based on the depth (number of stages) of character buffer 35, it is assumed that the index value is expressed in 4 bits. Character buffer match / mismatch determination unit 33 reads the 4 bits and obtains "1".

[0067] Character buffer 35 reads the character string stored in the entry with index "1" and outputs it as a mismatched character string in dictionary-based compression to dictionary-based decompression unit 36. Character buffer 35 also moves the character string stored in the entry with index "1" to the entry with index "0", and shifts the character string stored in the entry with an index smaller than index "1", i.e., the entry with index "0", so that its index becomes +1.

[0068] Next, dictionary match / mismatch determination unit 32 reads the next leading bit. This leading bit is also "0," so it is determined to be dictionary mismatch information. Therefore, the next leading bit is match / mismatch information from character buffer 35.

[0069] The character buffer match / mismatch determination unit 33 reads this match / mismatch information. Because the match / mismatch information is "0", it is clear that what follows is the number of mismatched characters and the mismatched character string from dictionary compression. The character buffer match / mismatch determination unit 33 reads the number of mismatched characters m * 8 bits and obtains the character string "AB_CD".

[0070] Character buffer 35 outputs the character string "AB_CD" received from character buffer match / mismatch determination unit 33 to dictionary-based decompression unit 36. Character buffer 35 also stores the character string "AB_CD" in the entry with index "0," and shifts all other character strings so that their indexes become +1.

[0071] Finally, the dictionary match / mismatch determination unit 32 reads the next leading bit. Because this leading bit is "1," it is clear that this is dictionary match information. Therefore, it is clear that the matching distance and matching length follow next. The number of bits of the matching distance and the number of bits of the matching length can vary depending on the configuration of the dictionary-based compression unit 21 of the compression unit 114 and the dictionary-based decompression unit 36 ​​of the decompression unit 115, but here they are assumed to be 12 bits and 8 bits. The dictionary match / mismatch determination unit 32 reads these 12 bits and 8 bits, obtains a matching distance of "3" and a matching length of "8," and outputs these to the dictionary-based decompression unit 36.

[0072] 7, assume that "00_43" stored in the entry at index "1" of character buffer 35 is sent to character buffer 35 as an unmatched string in dictionary-based compression. In this case, character buffer 35 moves "00_43" to the entry at index "0" and shifts the index smaller than index "1," i.e., "13_09" stored in the entry at index "0," so that its index becomes +1 (index "1").

[0073] If "AB_CD", which is not in character buffer 35, is sent to character buffer 35 as an unmatched string in lexicographic compression, character buffer 35 stores "AB_CD" in the entry with index "0" and shifts all other strings so that their indexes become +1.

[0074] FIG. 8 is a flowchart showing the operation procedure of the decompression unit 115 in the memory system of the first embodiment.

[0075] The dictionary match / mismatch determination unit 32 reads the first bit of the compressed data stored in the compressed stream buffer 31 (S201). If the value is "1" (S202: YES), the following data is a dictionary match character string. The dictionary match / mismatch determination unit 32 then reads data of the number of bits (Y bits) of match information and outputs it to the dictionary-based decompression unit 36 ​​as dictionary match information (S203).

[0076] On the other hand, if the first bit of the compressed data is "0" (S202: NO), the following data is an unmatched string from dictionary-based compression. Character buffer match / mismatch determination unit 33 reads the next bit (S204). If it is "1" (S205: YES), the unmatched string from dictionary-based compression matches one of the strings in character buffer 35. Character buffer match / mismatch determination unit 33 then reads [log2(X)] bits (S206). X is the depth (number of levels) of character buffer 35, and the value "T" of [log2(X)] bits is the index of character buffer 35. Character string Z stored in the entry at index "T" is a character string that matches the unmatched string from dictionary-based compression.

[0077] Character buffer 35 moves character string Z stored in the entry with index "T" to the entry with index "0" (S207). At that time, character buffer 35 shifts the character strings stored in the entries with indexes "0" to "T-1" so that the indexes become +1 (S208).

[0078] Character buffer 35 outputs the character string stored in the entry of index "T" to dictionary-based decompression unit 36 ​​as dictionary mismatch information (S213).

[0079] If the next leading bit is "0" (S205: NO), the mismatched string from dictionary compression is a string that is not in character buffer 35. Character buffer match / mismatch determination unit 33 then reads [log2(N-1)] bits (S209). The value "m" of [log2(N-1)] bits is the number of characters in the mismatched string from dictionary compression. Character buffer match / mismatch determination unit 33 further reads m*8 bits. The value of m*8 bits is the mismatched string from dictionary compression (string Z) (S210).

[0080] Character buffer 35 stores character string Z obtained by character buffer match / mismatch determination unit 33 in the entry with index "0" (S211). At that time, character buffer 35 shifts all character strings stored in character buffer 35 so that their indexes become +1 (S212).

[0081] The character buffer 35 outputs the character string Z to the dictionary-based decompression unit 36 ​​as dictionary mismatch information (S213).

[0082] The dictionary-based decompression unit 36 ​​performs dictionary-based decompression based on the dictionary match information received from the dictionary match / mismatch determination unit 32 or the dictionary mismatch information received from the character buffer 35 (S214), and outputs the decompressed data (S215).

[0083] The decompression unit 115 determines whether or not compressed data remains (S216), and if so (S216: YES), the process returns to S201 and executes a series of processes starting with reading the first bit by the dictionary match / mismatch determination unit 32. If no compressed data remains (S216: NO), the decompression unit 115 ends the decompression process.

[0084] As described above, in the memory system 1 of the first embodiment, the compression unit 114 buffers unmatched strings of dictionary-compressed data to a certain length, and when an input unmatched string of dictionary-compressed data matches any of the character buffers, it outputs an index of the match, thereby improving compression efficiency.

[0085] For example, the memory system 1 of the first embodiment can improve compression efficiency even when data in which certain 2-byte data frequently appears is input when the minimum match length of dictionary-based compression is 3 bytes.

[0086] That is, the compression unit 114 of the memory system 1 of the first embodiment is capable of compressing character strings that are shorter than the minimum matching length of dictionary-based compression.

[0087] (Second embodiment) Next, a second embodiment will be described. As with the first embodiment, the second embodiment will also be described by taking as an example a memory system realized as an SSD. The same components as those in the first embodiment will be designated by the same reference numerals, and their description will be omitted.

[0088] In the first embodiment, character buffer 23 of compression unit 114 and character buffer 35 of decompression unit 115 store a string of m characters, which is any value between 1 and (minimum matching length - 1). In contrast, in the second embodiment, character buffer 23 of compression unit 114 and character buffer 35 of decompression unit 115 store a string of m characters, which is a predetermined fixed value, for example, only M characters, which is (minimum matching length - 1).

[0089] In the first embodiment, compression unit 114 outputs a data set including match / mismatch information indicating a mismatch, the number of characters, and the mismatched character string from dictionary compression when no mismatched character string from dictionary compression exists in character buffer 23. In contrast, in the second embodiment, compression unit 114 does not need to include the number of characters in the data set to be output when no mismatched character string from dictionary compression exists in character buffer 23.

[0090] This further improves the compression efficiency of the compression section 114 of the second embodiment.

[0091] 9 is a flowchart showing the operation procedure of the compression unit 114 in the memory system 1 of the second embodiment. Here, only the parts (S303, S308) that are different from the first embodiment (FIG. 5) will be explained.

[0092] The match searcher 22 compares the unmatched character string of the M-character dictionary compression with the character string in the X-stage character buffer (S303), where M is a fixed value.

[0093] Furthermore, if the dictionary-compressed mismatched character string does not exist in the character buffer 23, the match searcher 22 outputs a data set including the match / mismatch information "0" indicating a mismatch and the dictionary-compressed mismatched character string (S308). This data set does not include the number of characters.

[0094] 10 is a flowchart showing the operation procedure of the decompression unit 115 in the memory system 1 of the second embodiment. Here, only the part (S409) that differs from the first embodiment (FIG. 8) will be explained.

[0095] If the first bit of the compressed data is "0" and the next first bit is also "0", the character buffer match / mismatch determination unit 33 reads M*8 bits and sets this value as the character string Z (S409). In the first embodiment, the number of characters in the mismatched character string obtained by dictionary compression is variable, so it was necessary to read [log2(N-1)] bits to obtain the number of characters. In contrast, in the second embodiment, the number of characters in the mismatched character string obtained by dictionary compression is a fixed value M, so it is not necessary to read compressed data to obtain the number of characters.

[0096] That is, the memory system 1 of the second embodiment can reduce the processing load on the decompression unit 115.

[0097] As described above, the memory system 1 of the second embodiment can further improve the compression efficiency of the compression unit 114 and reduce the processing load on the decompression unit 115 by limiting the number of characters of the string stored in the character buffer 23 of the compression unit 114 and the character buffer 35 of the decompression unit 115 to a predetermined fixed value, for example, M characters (minimum matching length - 1).

[0098] (Third embodiment) Next, a third embodiment will be described.

[0099] FIG. 11 is a diagram showing an example of the configuration of the compression unit 114 in the memory system 1 of the third embodiment.

[0100] 11, compression unit 114 of the third embodiment has a character buffer 23 for each number of characters in a non-matching string of dictionary-based compression. Here, an example is shown in which the minimum matching length of dictionary-based compression is 4, and three character buffers 23 are provided: a character buffer 23 for character number "1," a character buffer 23 for character number "2," and a character buffer 23 for character number "3."

[0101] In the third embodiment, match finder 22 determines whether a string matching the dictionary-compressed mismatched string exists in any of character buffers 23, based on the dictionary-compressed mismatched string from dictionary compression unit 21 and buffer information for multiple character buffers 23. If a string exists, match finder 22 outputs information indicating a match (match / mismatch information), an index (buffer index) indicating one of the three character buffers 23, and an index (string index) indicating an entry in character buffer 23 that stores a string matching the dictionary-compressed mismatched string. If a string does not exist, match finder 22 outputs information indicating a mismatch (match / mismatch information), as in the first embodiment.

[0102] In the third embodiment, when information indicating a match (match / mismatch information) is output from match searcher 22, character buffer 23 determines whether the buffer index output together with the match / mismatch information indicates itself. If it indicates itself, character buffer 23 acquires the string index output together with the match / mismatch information, and updates character buffer 23 based on this index, as described in the first embodiment. That is, it moves the string stored in the entry of the acquired index to index "0," and shifts the strings stored in the entries from index "0" to (acquired index - 1) so that their indexes become (index + 1).

[0103] When match finder 22 outputs information indicating a mismatch (match / mismatch information), character buffer 23 determines whether the dictionary-compressed mismatched string is a string that it should store, based on the number of characters in the dictionary-compressed mismatched string also output from match finder 22. If it is a string that it should store, character buffer 23 stores the string, as described in the first embodiment. That is, character buffer 23 stores the dictionary-compressed mismatched string in the entry with index "0," and shifts all stored strings so that their indexes become index +1.

[0104] FIG. 12 is a diagram showing the concept of updating the character buffer 23 in the third embodiment.

[0105] In FIG. 12, the index of the character buffer 23 that stores a character string with a character length of 1 is "0", the index of the character buffer 23 that stores a character string with a character length of 2 is "1", and the index of the character buffer 23 that stores a character string with a character length of 3 is "2".

[0106] For example, if the input unmatched character string from dictionary compression is "OS," match finder 22 searches character buffer 23 at index "1," which stores a character string with a character length of 2. If the input character string is in character buffer 23 at index "1," match finder 22 outputs information indicating a match (match / mismatch information "1"), information indicating which character buffer 23 the match occurred in (buffer index "1"), and the index of the entry in that character buffer 23 (character string index). In the case of a mismatch, match finder 22 outputs information indicating a mismatch (match / mismatch information "0"), the number of characters, and the unmatched character string from dictionary compression, as in the first embodiment.

[0107] Furthermore, character buffer 23 with index "1" that stores "OS" is updated in the same manner as in the first embodiment. Note that the number of stages of multiple character buffers 23 does not necessarily have to be the same. For example, based on statistics of mismatched character strings that have appeared in dictionary-based compression, the number of stages of character buffer 23 with the number of characters that appear most frequently may be increased, and the number of stages of character buffer 23 with the number of characters that appear least frequently may be decreased.

[0108] In the third embodiment, character strings with a high number of characters are not expelled from character buffer 23 by character strings with a low number of characters. Furthermore, since the number of stages can be changed among multiple character buffers 23, character buffers 23 that store character strings with a high number of characters can be made larger in number than character buffers 23 that store character strings with a low number of characters, thereby enabling character strings with a high number of characters to be stored for a long period of time in character buffer 23. This improves the compression efficiency of compression unit 114 in the third embodiment.

[0109] 13 is a flowchart showing the operation procedure of the compression unit 114 in the memory system 1 of the third embodiment. Here, only the parts (S505, S506, S507, S509, S510) that are different from the first embodiment (FIG. 5) will be explained.

[0110] If an unmatched string obtained by dictionary compression exists in character buffer 23, match searcher 22 outputs a data set including match / mismatch information "1" indicating a match, a buffer index "S" of character buffer 23 where a string matching the unmatched string obtained by dictionary compression exists, and a string index "T" of an entry in character buffer 23 where a string matching the unmatched string obtained by dictionary compression is stored (S505). That is, compared to the first embodiment, buffer index "S" has been added to the data set.

[0111] The character buffer 23 of buffer index "S" moves the character string stored in the entry with index "T" to the entry with index "0" (S506). At that time, the character buffer 23 of buffer index "S" shifts the character strings stored in the entries with indexes "0" to "T-1" so that the index becomes +1 (S507). The character buffers 23 other than those of buffer index "S" do nothing in S506 and S507.

[0112] If the unmatched string from dictionary compression is not present in character buffer 23 and match searcher 22 outputs a data set including match / mismatch information "0" indicating a mismatch, the number of characters "m", and the unmatched string from dictionary compression, the unmatched string from dictionary compression is stored in the entry with index "0" of character buffer 23 that stores strings of the same number of characters (S509).At this time, character buffer 23 that stores strings of the same number of characters as the unmatched string from dictionary compression shifts all stored strings so that their indexes become +1 (S510).

[0113] FIG. 14 is a diagram showing an example of the configuration of the decompression unit 115 in the memory system 1 of the third embodiment.

[0114] 14, the decompression unit 115 of the third embodiment also has a character buffer 35 for each number of characters in the mismatched character strings of dictionary-based compression, similar to the compression unit 114. Specifically, it has three character buffers 35: a character buffer 35 for the number of characters "1", a character buffer 35 for the number of characters "2", and a character buffer 35 for the number of characters "3".

[0115] Character buffer match / mismatch determination unit 33 of the third embodiment reads the first 1 bit of the compressed data received from dictionary match / mismatch determination unit 32. This 1 bit is character buffer match / mismatch information.

[0116] If the character buffer match / mismatch information is "1", the mismatched character string from the dictionary-based compression matches one of the character strings in one of the character buffers 35. In this case, character buffer match / mismatch determination unit 33 then reads [log2(L)] bits, where L is the number of character buffers. [log2(L)] is also a ceiling function, and [log2(L)] bits is the number of bits required to represent, for example, L numbers from 0 to L-1 in binary notation. The value of [log2(L)] bits is an index (buffer index) that indicates one of the three character buffers 35. Character buffer match / mismatch determination unit 33 sets the value of [log2(L)] bits, i.e., the value of the buffer index, to S.

[0117] The character buffer match / mismatch determination unit 33 then calculates [log2(X S )] bit. X S is the depth (number of levels) of the character buffer 35 indicated by the buffer index "S". [log2(X S )] is also a ceiling function, and [log2(X S )]bit is, for example, 0 to X S X up to -1 S is the number of bits required to represent a number in binary. [log2(X S The value of the ) bit is the index of the entry that stores the string that matches the unmatched string in lexicographical compression among the X entries of the character buffer 35 indicated by the buffer index "S".

[0118] If the character buffer match / mismatch information is "0", character buffer match / mismatch determination unit 33 then reads [log2(N-1)] bits to obtain the number of characters (m) of the mismatched character string compressed using the dictionary method. Furthermore, character buffer match / mismatch determination unit 33 reads m*8 bits to obtain the mismatched character string compressed using the dictionary method.

[0119] The character buffer match / mismatch determination unit 33 outputs the character buffer match / mismatch information (“1” or “0”) and the acquired data (index, or the number of characters and the mismatched character strings obtained by dictionary compression) to three character buffers 35.

[0120] Each character buffer 35 receives character buffer match / mismatch information from character buffer match / mismatch determination unit 33. If the received character buffer match / mismatch information is "1," the other two pieces of data received from character buffer match / mismatch determination unit 33 are a buffer index and a string index. In this case, each character buffer 35 determines whether the buffer index indicates itself. The character buffer 35 indicated by the buffer index reads the string stored in the entry of the string index and outputs it to dictionary-based decompression unit 36 ​​as a dictionary-based mismatch string.

[0121] Furthermore, the character buffer 35 indicated by the buffer index moves the character string stored in the entry with the character string index "T" to the entry with the index "0", and shifts the character strings stored in the entries with the indexes "0" to "T-1" so that their indexes become +1.

[0122] 15 is a flowchart showing the operation procedure of the decompression unit 115 in the memory system 1 of the third embodiment. Here, only the parts (S606 to S609, S612, S613) that are different from the first embodiment (FIG. 8) will be explained.

[0123] If the first bit of the compressed data is "0" and the next bit is "1", character buffer match / mismatch determination unit 33 then reads [log2(L)] bits (S606), where L is the number of character buffers 35, and the value "S" of [log2(L)] bits is the buffer index.

[0124] The character buffer match / mismatch determination unit 33 then calculates [log2(X S )] bit is read (S607). X Sis the depth (number of levels) of the character buffer 35 of buffer index “S”, and is [log2(X S The value "T" of the ) bit is an index into the character buffer 35 for the buffer index "S," i.e., a string index. The string Z stored in the entry at index "T" in the character buffer 35 for the buffer index "S" is a string that matches the unmatched string in the lexicographic compression.

[0125] The character buffer 35 of the buffer index "S" moves the character string Z stored in the entry of the index "T" to the entry of the index "0" (S608). At that time, the character buffer 35 of the buffer index "S" shifts the character strings stored in the entries from the index "0" to the index "T-1" so that the index becomes +1 (S609).

[0126] Character buffer 35, which stores a character string of m characters, stores character string Z in the entry with index "0" (S612). At that time, character buffer 35, which stores a character string of m characters, shifts all stored character strings so that the indexes become +1 (S613).

[0127] As described above, in the memory system 1 of the third embodiment, the compression unit 114 has a character buffer 23 for each number of characters in the dictionary-compressed mismatched string. The decompression unit 115 also has a character buffer 35 for each number of characters in the dictionary-compressed mismatched string.

[0128] As a result, the memory system 1 of the third embodiment can improve compression efficiency by preventing character strings with a high frequency of occurrence from being pushed out of character buffer 23 or character buffer 35 by character strings with a low frequency of occurrence.

[0129] (Fourth embodiment) Next, a fourth embodiment will be described.

[0130] FIG. 16 is a diagram showing an example of the configuration of the compression unit 114 in the memory system 1 of the fourth embodiment.

[0131] As shown in FIG. 16, the compression unit 114 of the fourth embodiment has a character buffer 23-2 of the FIFO (first in first out) type.

[0132] In the first embodiment, if an unmatched string obtained by dictionary compression matches any of the strings in character buffer 23, the string is moved to the entry with index "0." In contrast, in the fourth embodiment, regardless of whether an unmatched string obtained by dictionary compression matches any of the strings in character buffer 23-2, the string is stored in the entry with index "0."

[0133] In other words, even if a string that matches an unmatched string from dictionary compression exists in character buffer 23-2 in the fourth embodiment, character buffer 23-2 automatically stores the unmatched string from dictionary compression in the entry with index "0," resulting in duplicate storage of the same string.

[0134] Even if the same character string exists in character buffer 23-2, some entries will be wasted, but if that character string appears again as a mismatched character string in dictionary-based compression, the comparison will end when the character string stored in the entry with the smaller index value is detected, so there will be little degradation in compression efficiency.

[0135] On the other hand, updating of the character buffer 23-2 becomes easier, which leads to a reduction in the circuit scale of the character buffer 23-2, and therefore the memory system 1 of the fourth embodiment can achieve cost reduction.

[0136] FIG. 17 is a diagram showing the concept of updating the character buffer in the memory system of the fourth embodiment.

[0137] 17, for example, if the input unmatched string from dictionary compression is "stu," it is stored in the entry at index "3" in character buffer 23-2, and is found to match the unmatched string from dictionary compression. However, character buffer 23-2 in the fourth embodiment shifts all stored strings so that their indexes become +1, and stores "stu" at index "0." In this case, "stu" at index "3" becomes index "4," and "stu" is duplicated at both index "0" and index "4."

[0138] If "stu" is next input as an unmatched string in dictionary compression, the smaller index "0" will be selected.

[0139] FIG. 18 is a flowchart showing the operation procedure of the compression unit 114 in the memory system 1 of the fourth embodiment.

[0140] Here, only the parts (S707, S708) that are different from the first embodiment (FIG. 5) will be explained.

[0141] Character buffer 23-2 stores the dictionary-compressed mismatched character string at index "0" (S707), regardless of whether the dictionary-compressed mismatched character string exists in character buffer 23-2. At that time, character buffer 23-2 shifts all stored character strings so that their indexes become +1 (S708).

[0142] FIG. 19 is a diagram showing an example of the configuration of the decompression unit 115 in the memory system 1 of the fourth embodiment.

[0143] As shown in FIG. 19, the decompression unit 115 of the fourth embodiment also has a FIFO character buffer 35-2, similar to the compression unit 114.

[0144] In the fourth embodiment, when character buffer match / mismatch information received from character buffer match / mismatch determination unit 33 is "1," the other data received from character buffer match / mismatch determination unit 33 is the index of character buffer 35-2. In this case, character buffer 35-2 reads a character string from the entry of that index and outputs it to dictionary-based decompression unit 36 ​​as a dictionary-based compressed mismatched character string. Character buffer 35-2 also stores the dictionary-based compressed mismatched character string already present in character buffer 35-2 at index "0," and shifts the index of the other character strings so that their indexes become +1.

[0145] Furthermore, if the character buffer match / mismatch information received from character buffer match / mismatch determination unit 33 is "0," the other data received from character buffer match / mismatch determination unit 33 is a dictionary-compressed mismatched character string. In this case, character buffer 35-2 outputs the dictionary-compressed mismatched character string to dictionary-compressed decompression unit 36. Furthermore, character buffer 35-2 stores the dictionary-compressed mismatched character string at index "0" and shifts the other character strings so that their indexes become +1.

[0146] By using the FIFO method for the character buffer 35-2 of the decompression unit 115 as well, the circuit scale for the character buffer 35-2 can also be reduced, leading to cost reductions.

[0147] 20 is a flowchart showing the operation procedure of the decompression unit 115 in the memory system 1 of the fourth embodiment. Here, only the parts (S806 to S810) that are different from the first embodiment (FIG. 8) will be explained.

[0148] Character buffer 35-2 obtains an index from the compressed data and stores the unmatched string obtained from character buffer 35-2 using the dictionary compression (S806) or the unmatched string obtained from the compressed data using the dictionary compression (S807, S808) at index "0" (S809), regardless of whether the unmatched string obtained from the dictionary compression matches any of the strings in character buffer 35-2. At that time, character buffer 35-2 shifts the index of all stored strings so that the index becomes +1 (S810).

[0149] As described above, the memory system 1 of the fourth embodiment can reduce the circuit size and costs by using FIFO-type buffers for both the character buffer 23-2 of the compression unit 114 and the character buffer 35-2 of the dictionary-based decompression unit 36.

[0150] (Fifth embodiment) Next, a fifth embodiment will be described.

[0151] FIG. 21 is a diagram showing an example of the configuration of the compression unit 114 in the memory system 1 of the fifth embodiment.

[0152] 21, the compression unit 114 of the fifth embodiment has a plurality of character buffers 23. Here, an example is shown in which two character buffers 23, a character buffer [0] 23 and a character buffer [1] 23, are provided.

[0153] Compression unit 114 of the third embodiment also has multiple character buffers 23, but compression unit 114 of the third embodiment provides a character buffer 23 for each number of characters in the mismatched character strings obtained by dictionary compression. In other words, compression unit 114 of the third embodiment uses different character buffers 23 for each number of characters in the mismatched character strings obtained by dictionary compression. In contrast, compression unit 114 of the fifth embodiment uses different character buffers 23 in a time-division manner.

[0154] Character buffer 23 updates by storing an unmatched string from dictionary compression at index "0," or, if a string that matches an unmatched string from dictionary compression exists, by moving that string to index "0." Until this update is complete, it is not possible to determine whether the next unmatched string from dictionary compression is a match.

[0155] Therefore, in the fifth embodiment, when there are two character buffers 23, for example, compression unit 114 alternately uses these two character buffers 23 in a time-division manner, and while one character buffer 23 is being updated, the other character buffer 23 is referenced in the match / mismatch determination, thereby preventing the next match / mismatch determination from having to wait for the update of character buffer 23 to be completed. Even if the update of character buffer 23 has not been completed at the time the next match / mismatch determination is started, the time spent waiting for the update of character buffer 23 to be completed can be reduced.

[0156] In the fifth embodiment, when the character buffer [0] 23 is referenced by the match searcher 22 at a certain time t, the character buffer [0] 23 for the unmatched string (t) of dictionary-based compression is updated in two cycles at times t and t+1.

[0157] Similarly to the character buffer [1] 23 of the fifth embodiment, when referenced by the match searcher 22 at a certain time t, the character buffer [1] 23 for the unmatched string (t) of dictionary-based compression is updated in two cycles at times t and t+1.

[0158] The match searcher 22 of the fifth embodiment switches the timing of exclusively referencing character buffer [0] 23 or character buffer [1] 23 depending on the time. For example, if the match searcher 22 refers to character buffer [0] 23 at a certain time t, it refers to character buffer [1] 23 at the next time t+1.

[0159] FIG. 22 is a diagram showing the concept of updating the character buffer 23 in the memory system 1 of the fifth embodiment.

[0160] The compression unit 114 of the fifth embodiment updates the character buffer 23 in two cycles.

[0161] For example, at time t, if the match searcher 22 uses the character buffer [0] 23 to determine whether the string “stu” is a match or not with the unmatched string of the dictionary-based compression, the character buffer [0] 23 starts updating the character buffer [0] 23 in response to the result.

[0162] Meanwhile, at time t, character buffer [1] 23 completes updating for the unmatched lexicographically compressed string "ft" input at time t-1. At the next time t+1, character buffer [0] 23 completes updating for the unmatched lexicographically compressed string "stu", and character buffer [1] 23 starts updating for the unmatched lexicographically compressed string "0".

[0163] 23 is a flowchart showing the operation procedure of the compression unit 114 in the memory system 1 of the fifth embodiment. Here, only the parts (S803, S806, S807, S809, S810) that are different from the first embodiment (FIG. 5) will be explained.

[0164] The match searcher 22 compares the m-character dictionary-compressed unmatched string with the string in the character buffer (t) 23 (S803). The character buffer (t) 23 is the character buffer 23 that is applied at time t.

[0165] If an unmatched character string from dictionary compression exists in character buffer (t) 23, character buffer (t) 23 moves the unmatched character string from dictionary compression to index "0" (S806). At that time, character buffer (t) 23 shifts the character strings from index "0" to index "T-1" so that their indexes become +1 (S807).

[0166] If the unmatched string from dictionary compression does not exist in character buffer (t) 23, character buffer (t) 23 stores the unmatched string from dictionary compression at index "0" (S809). At that time, character buffer (t) 23 shifts all stored strings so that their indexes become +1 (S810).

[0167] If there is data remaining to be compressed, the compression unit 114 increments t (+1) and starts processing from S801, without waiting for the completion of updating the character buffer (t) 23 in S806 and S807 or the updating of the character buffer (t) 23 in S809 and S810.

[0168] FIG. 24 is a diagram showing an example of the configuration of the decompression unit 115 in the memory system 1 of the fifth embodiment.

[0169] 24, decompression unit 115 of the fifth embodiment also has two character buffers 23: character buffer [0] 23 and character buffer [1] 23. Like compression unit 114, decompression unit 115 of the fifth embodiment also uses the two character buffers 23 alternately in a time-division manner.

[0170] Character buffer match / mismatch determination unit 33 of the fifth embodiment switches the timing of outputting character buffer match / mismatch information, etc., selectively and exclusively to character buffer [0] 35 or character buffer [1] 35 depending on the time. For example, if character buffer match / mismatch determination unit 33 outputs character buffer [0] 23 at time t, it outputs to character buffer [1] 23 at the next time t+1.

[0171] In the fifth embodiment, when character buffer [0] 35 receives character buffer match / mismatch information from character buffer match / mismatch determination unit 33 at a certain time t, character buffer [0] 35 updates the character buffer [0] 35 for the mismatched string (t) of dictionary-based compression in two cycles at times t and t+1.

[0172] Like character buffer [0] 35, in the fifth embodiment, when character buffer match / mismatch information is received from character buffer match / mismatch determination unit 33 at a certain time t, character buffer [1] 35 for the mismatched character string (t) obtained by dictionary compression is updated in two cycles at times t and t+1.

[0173] 25 is a flowchart showing the operation procedure of the decompression unit 115 in the memory system 1 of the fifth embodiment. Here, only the parts (S907 to S909, S912 to S914) that are different from the first embodiment (FIG. 8) will be explained.

[0174] Character buffer match / mismatch determination unit 33 selects character buffer (t) 35 from which character string Z is obtained based on the index obtained from the compressed data (S907). Character buffer (t) 35 is the character buffer 35 applied at time t.

[0175] Character buffer (t) 35 moves character string Z stored in the entry with index "T" to the entry with index "0" (S908). At that time, character buffer (t) 35 shifts the character strings stored in the entries with index "0" to index "T-1" so that the index becomes +1 (S609).

[0176] Furthermore, the character buffer match / mismatch determination unit 33 selects the character buffer (t) 35 for storing the dictionary-compressed mismatched character string Z obtained from the compressed data (S912).

[0177] Character buffer (t) 35 stores character string Z in the entry with index "0" (S913). At that time, character buffer (t) 35 shifts all stored character strings so that their indexes become +1 (S914).

[0178] If compressed data remains, the decompression unit 115 increments t (+1) and starts processing from S901, without waiting for the completion of updating the character buffer (t) 23 in S908 and S909 or the updating of the character buffer (t) 23 in S913 and S914.

[0179] As described above, in the memory system 1 of the fifth embodiment, the compression unit 114 and the decompression unit 115 have multiple character buffers 23, 35, so that the time spent waiting for the update of the character buffer 23 to be completed can be eliminated or significantly reduced.

[0180] Although an example of providing two character buffers 23, 35 has been shown here, it is also possible to provide three or more character buffers 23, 35 and ensure that the updating of character buffers 23, 35 is completed within a time limit that does not cause waiting time.

[0181] In this way, the memory system 1 of the fifth embodiment can improve response performance in addition to improving compression efficiency.

[0182] Although several embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be embodied in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included within the scope and spirit of the invention, and are also included in the scope of the invention and its equivalents as defined in the claims. [Explanation of symbols]

[0183] 1...memory system, 2...host, 11...memory controller, 12...flash memory, 21...lexicographic compression unit, 22...match searcher, 23...character buffer, 24...character match / mismatch selector, 25...bit packing unit, 31...compressed stream buffer, 32...dictionary match / mismatch determination unit, 33...character buffer match / mismatch determination unit, 34...cutout amount calculation unit, 35...character buffer, 36...lexicographic decompression unit, 111...processor, 112...host interface unit, 113...memory interface unit, 114...compression unit, 115...decompression unit, 116...ECC unit.

Claims

1. 1. A method for controlling a non-volatile memory, the method comprising: If the length of the input string is greater than or equal to a predetermined length, information showing the comparison result between the input string and previously appearing strings is output as compressed data; if the length of the input string is less than the predetermined length, the input string is output as a mismatched string. determining whether the outputted mismatched character string matches any of the mismatched character strings stored in a buffer in which mismatched character strings that have previously appeared are stored; If the output mismatch string matches any of the mismatch strings in the buffer, a first dataset is output as compressed data, which includes a flag information indicating a match and an index information indicating the entry in the buffer where the mismatch string determined to match is stored. If the outputted mismatch string does not match any of the mismatch strings in the buffer, the outputted mismatch string is stored in the buffer, and a second dataset including the flag information indicating the mismatch and the outputted mismatch string is output as the compressed data. storing data based on the output compressed data in the nonvolatile memory; method.

2. The buffer is assigned indexes in ascending order from the first entry to the last entry, The method comprises: if the outputted mismatched character string matches any of the mismatched character strings in the buffer, move the mismatched character string in the buffer that is determined to match to the first entry, and update the buffer so that the indexes corresponding to the mismatched character strings stored in each entry from the first entry to the entry immediately preceding the entry in which the mismatched character string determined to match is stored are decremented by one; Further, The method of claim 1.

3. The method comprises: If the outputted mismatched string does not match any of the mismatched strings in the buffer, the outputted mismatched string is stored in the buffer. Furthermore, When the outputted mismatch string does not match any of the mismatch strings in the buffer, storing the outputted mismatch string in the buffer is: decrementing the index corresponding to the mismatched character string stored in each entry of the buffer by one, and storing the output mismatched character string in the first entry; Further, The method of claim 2.

4. The buffer stores a predetermined number of unmatched character strings; The predetermined number of characters is (the predetermined length - 1). The method of claim 1.

5. the second data set output as the compressed data includes the number of characters in the output mismatched string; the number of characters in the output mismatched character string is any one of 1 to ((the predetermined length - 1)), The determination of whether or not the string matches any of the unmatched strings in the buffer is made by: determining one of the (predetermined length - 1) buffers according to the number of characters of the output mismatched character string; This includes: The output of the first data set is an identification number uniquely identifying each of the (predetermined length - 1) buffers is included in the first data set; Including, The method of claim 1.

6. The method comprises: The method of claim 1 , further comprising storing the outputted unmatched string in a first entry of the buffer.

7. The method comprises: The plurality of buffers are alternately used in a time-division manner; While updating the first buffer among the plurality of buffers based on the first mismatch string which is the outputted mismatch string, it is determined whether the second mismatch string which is output following the first mismatch string matches any of the mismatch strings in the second buffer which is different from the first buffer among the plurality of buffers. Further, The method of claim 1.

8. a dictionary-based compression circuit that outputs, as compressed data, information indicating a comparison result between an input character string and a character string that has appeared in the past when the length of the input character string is equal to or greater than a predetermined length, and outputs, as a non-matching character string, when the length of the input character string is less than the predetermined length; a buffer for storing the unmatched string; a match search circuit that refers to the buffer and determines whether the unmatched character string output from the dictionary compression circuit matches any of the unmatched character strings in the buffer; Equipped with The match search circuit If the mismatched string output from the dictionary-type compression circuit matches any of the mismatched strings in the buffer, a first dataset is output as the compressed data, which includes a flag indicating the match and an index indicating the entry in the buffer where the mismatched string determined to match is stored. If the mismatched string output from the dictionary-type compression circuit does not match any of the mismatched strings in the buffer, the mismatched string output from the dictionary-type compression circuit is output to the buffer, and a second dataset including the flag information indicating the mismatch and the mismatched string output from the dictionary-type compression circuit is output as the compressed data. The buffer stores the mismatched strings output from the matching search circuit and the mismatched strings output from the dictionary-style compression circuit. Compression encoding device.

9. The matching search circuit outputs the index information of the first dataset to a buffer. The aforementioned buffer is The index is assigned in ascending order from the first entry to the last entry. The mismatched string stored in the entry corresponding to the index information of the first dataset is moved to the first entry, and the index corresponding to the mismatched string stored in each entry from the first entry up to the entry immediately preceding the entry indicated by the index information is shifted down by one position. The compression encoding device according to claim 8.

10. When storing the mismatched character string output from the match search circuit, the buffer decrements the index corresponding to the mismatched character string stored in each entry of the buffer by one, and stores the mismatched character string output from the match search circuit in the first entry. The compression encoding device according to claim 9.

11. The buffer stores the mismatched string of a predetermined number of characters, The predetermined number of characters is (the predetermined length - 1). The compression encoding device according to claim 8.

12. the second data set output as the compressed data from the match search circuit includes the number of characters in the unmatched character string output from the dictionary compression circuit; The number of characters in the mismatched string output from the dictionary-type compression circuit is one to ((the predetermined length - 1)), The compression encoding device comprises (the predetermined length - 1) of the buffers, The match search circuit determining one of the (predetermined length - 1) buffers according to the number of characters of the unmatched character string output from the dictionary compression circuit; an identification number uniquely identifying each of the (predetermined length - 1) buffers is included in the first data set; The compression encoding device according to claim 8.

13. The compression encoding device according to claim 8, wherein the buffer stores the mismatched string output from the match search circuit in the first entry, regardless of whether the mismatched string output from the match search circuit matches any of the mismatched strings in the buffer.

14. The system comprises multiple buffers, The match search circuit The plurality of buffers are alternately used in a time-division manner; While updating the first buffer among the plurality of buffers based on the first mismatch string which is a mismatch string output from the dictionary-type compression circuit, a second buffer among the plurality of buffers is used to determine whether the second mismatch string which is output from the dictionary-type compression circuit and follows the first mismatch string matches any of the mismatch strings in the second buffer, which is separate from the first buffer among the plurality of buffers. The compression encoding device according to claim 8.

15. the second unmatched character string is the unmatched character string output from the dictionary compression circuit subsequent to the first unmatched character string, The update of the first buffer is If a second mismatch string output from the dictionary-type compression circuit matches any of the mismatch strings in the buffer before the first mismatch string output from the dictionary-type compression circuit, the mismatch string stored in the entry corresponding to the index information of the first dataset corresponding to the second mismatch string is moved to the first entry, and the index corresponding to the mismatch string stored in each entry from the first entry up to the entry immediately preceding the entry indicated by the index information is shifted down by one, If the second mismatched string does not match any of the mismatched strings in the buffer, the index corresponding to the mismatched string stored in each entry of the buffer is shifted down by one, and the second mismatched string is stored in the first entry. Including, The compression encoding device according to claim 14.

16. The compression encoding device according to claim 8, wherein the information includes information indicating the position of the string in the dictionary in which previously appearing strings are stored, and information indicating the match length.

17. Non-volatile memory and A memory controller that controls the non-volatile memory and includes a compression encoding device according to any one of claims 8 to 13, Equipped with The memory controller inputs the string into the dictionary-type compression circuit and stores the data based on the compressed data output from the compression encoding device in the non-volatile memory. Memory system.

18. A compression encoding device according to any one of claims 8 to 11, A decompression device for decompressing compressed data compressed by the compression encoding device, Equipped with The aforementioned extension device is Dictionary-style expansion circuit and, A character buffer match / mismatch determination circuit that obtains the first data set or the second data set from the compressed data, A second buffer for storing the mismatched string, Equipped with The second buffer is, The index is assigned in ascending order from the first entry to the last entry. When the index information included in the first dataset is output from the character buffer match / mismatch determination circuit, the mismatched string stored in the entry indicated by the index information is output to the dictionary-style decompression circuit as the string to be decompressed, the mismatched string stored in the entry indicated by the index information is moved to the first entry, and the index corresponding to the mismatched string stored in each entry from the first entry up to the entry immediately preceding the entry indicated by the index information is shifted down by one. If a mismatched string included in the second dataset is output from the character buffer match / mismatch determination circuit, the mismatched string is output to the dictionary-style decompression circuit as the string to be decompressed, and the index corresponding to the mismatched string stored in each entry of the second buffer is shifted down by one, so that the mismatched string output from the character buffer match / mismatch determination circuit is stored in the first entry. Compression and expansion system.

19. The compression encoding device according to claim 12, A decompression device for decompressing compressed data compressed by the compression encoding device, Equipped with The aforementioned extension device is Dictionary-style expansion circuit and, A character buffer match / mismatch determination circuit that obtains the first data set or the second data set from the compressed data, a second buffer (the predetermined length minus one) for storing the unmatched character strings; Equipped with Each of the (predetermined length - 1) second buffers is Each one is assigned a unique identification number, The index is assigned in ascending order from the first entry to the last entry. When the identification number and index information included in the first dataset are output from the character buffer match / mismatch determination circuit, it is determined whether the identification number refers to itself, and if it refers to itself, the mismatched string stored in the entry indicated by the index information is output to the dictionary-style decompression circuit as the string to be decompressed, and the mismatched string stored in the entry indicated by the index information is moved to the first entry, and the index corresponding to the mismatched string stored in each entry from the first entry to the entry immediately preceding the entry indicated by the index information is shifted down by one, When the number of characters in the mismatched string included in the second dataset and the mismatched string are output from the character buffer match / mismatch determination circuit, it is determined whether or not the mismatched string should be stored based on the number of characters in the mismatched string. If it should be stored, the mismatched string is output to the dictionary-style decompression circuit as the string to be decompressed, and the index corresponding to the mismatched string stored in each entry is shifted down by one, and the mismatched string is stored in the first entry. Compression and expansion system.

20. a compression encoding device according to claim 13; A decompression device for decompressing compressed data compressed by the compression encoding device, Equipped with The aforementioned extension device is Dictionary-style expansion circuit and, A character buffer match / mismatch determination circuit that obtains the first data set or the second data set from the compressed data, A second buffer for storing the mismatched string, Equipped with The second buffer is, The index is assigned in ascending order from the first entry to the last entry. when the index information included in the first data set is output from the character buffer match / mismatch determination circuit, output the mismatched character string stored in the entry indicated by the index information to the dictionary-based decompression circuit as a character string to be decompressed, store the mismatched character string stored in the entry indicated by the index information in the first entry, and decrement the index corresponding to the mismatched character string stored in each entry of the second buffer by one; when an unmatched character string included in the second data set is output from the character buffer match / mismatch determination circuit, output the unmatched character string to the dictionary-based decompression circuit as a character string to be decompressed, and decrement the indexes corresponding to the unmatched character strings stored in each entry of the second buffer by one, so that the unmatched character string is stored in the first entry; Compression and expansion system.

21. a compression encoding device according to claim 14; A decompression device for decompressing compressed data compressed by the compression encoding device, Equipped with The aforementioned extension device is Dictionary-style expansion circuit and, A character buffer match / mismatch determination circuit that obtains the first data set or the second data set from the compressed data, a plurality of second buffers for storing the unmatched strings; Equipped with The character buffer match / mismatch determination circuit the second buffers are alternately used in a time-division manner; outputting, to a second buffer among the plurality of buffers, the index information included in the first data set or the mismatched character string included in the second data set, which is acquired at a second timing subsequent to the first timing, while updating a first buffer among the plurality of buffers based on the first data set or the second data set acquired at a first timing; Compression and expansion system.

Citation Information

Patent Citations

  • Dictionary preload for data compression

    US10187081B1

  • Method and system for improving lossless compression efficiency

    US20030179114A1

  • Apparatus and method for managing multiple dictionaries in content addressable memory based data compression

    US5373290A