Data compression and decompression method, data compression device, and data decompression device

By adjusting the entry and output of symbols according to the usage status of the table in the compression and decompression device, the problem of insufficient compression rate in the prior art is solved, and more efficient data compression and decompression are achieved.

CN113796015BActive Publication Date: 2025-09-19UNIV OF TSUKUBA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080033904.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-05-07
Filing Date
2020-04-28
Publication Date
2025-09-19
Estimated Expiration
2040-04-28

AI Technical Summary

Technical Problem

In the prior art, data compression methods cannot adjust the length of compressed data according to the usage of the table, resulting in insufficient compression rate.

Method used

By logging symbols in the compression device and outputting position information and index data, the size of the position information is changed according to the usage of the table. The decompression device logs symbols in the second table and outputs symbols according to the same method, thereby realizing flexible compression and decompression of data.

Benefits of technology

The data compression rate is improved, and the compression rate is dynamically adjusted according to the usage of the table, achieving more efficient data compression and decompression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113796015B_ABST
    Figure CN113796015B_ABST
Patent Text Reader

Abstract

The compression device performs the following processing: when the input symbol is not logged in a first table having a plurality of entries, the symbol is logged in one of the plurality of entries and indicator data representing non-compression and the symbol is output; when the symbol is logged in the table, the compression indicator data and position information representing the position of the entry in which the symbol is logged and having a size smaller than the size of the symbol are output; and the size of the position information is changed according to the usage status of the plurality of entries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data compression and decompression method, a data compression device, and a data decompression device. Background Art

[0002] In the past, there was a data compressor (for example, patent document 1), which includes: a conversion unit, which converts two or more symbols into one symbol when two or more consecutive symbols contained in an input data stream composed of multiple fixed-length symbols have been logged; and an output unit, which outputs the one symbol when two or more symbols have been converted into the one symbol in the conversion unit, otherwise outputs two or more symbols.

[0003] In addition, there is the following data compression method. That is, a data stream is compressed in units of symbols, wherein a symbol is data of a fixed length. Then, a conversion table (conversion table) in which an entry (entry) indicating the correspondence between two or more symbols before conversion and one symbol after conversion is logged is retrieved, and when it is determined that two or more consecutive symbols in the data stream are not logged as two or more symbols before conversion, the two or more consecutive symbols are logged in the conversion table as entries of the two or more symbols before conversion. In addition, two or more consecutive symbols are output without being converted, and when two or more consecutive symbols in the data stream are logged in the entry of the conversion table as two or more symbols before conversion, the two or more consecutive symbols are converted into one symbol after conversion for which a correspondence is established in the entry (for example, Patent Document 2).

[0004] (Prior art literature)

[0005] (Patent Document)

[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 2014-236449

[0007] Patent Document 2: Japanese Patent Application Laid-Open No. 2016-184830 Summary of the Invention

[0008] (Problems to be solved by the invention)

[0009] In the above-mentioned conventional technology, compression is performed by converting two fixed-length symbols into one fixed-length symbol, and there is no concept of making the length of compressed data variable according to the usage status of a table.

[0010] The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to provide a technology capable of improving the data compression rate according to the usage status of a table.

[0011] (Measures taken to resolve the problem)

[0012] One embodiment of the present invention is a method for compressing and decompressing data, wherein a compression device performs the following processing: when an input symbol is not registered in a first table having a plurality of entries, registering the symbol in one of the plurality of entries and outputting uncompressed index data and the symbol; when the symbol is registered in the table, outputting compressed index data and position information having a size smaller than the size of the symbol and indicating the position of the entry in which the symbol is registered; and changing the size of the position information according to the usage status of the plurality of entries.

[0013] The decompression device performs the following processing: when receiving the indicator data representing the non-compressed state and the symbol, the symbol is logged in a second table having the same data structure as the first table in the same way as the symbol is logged in by the compression device, and the processing of outputting the symbol; and when receiving the indicator data representing the compressed state and the position information, the symbol logged in the entry in the second table represented by the position information is read and output.

[0014] Other aspects of the present invention may include the above-mentioned compression device, decompression device, data compression method and data decompression method based on these, and a program for operating a computer as a compression device or decompression device.

[0015] (Effects of the Invention)

[0016] According to the present invention, the data compression rate can be improved according to the usage status of the table. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The conversion table provided in the compressor and decompressor of the reference example is schematically shown.

[0018] Figure 2 A to C are explanatory diagrams of the compression method of the reference example.

[0019] Figure 3 A to C are explanatory diagrams of the compression method of the reference example.

[0020] Figure 4 A and B are diagrams illustrating a compression method according to a reference example.

[0021] Figure 5 A and B are diagrams illustrating a compression method according to a reference example.

[0022] Figure 6 A to C are diagrams illustrating a decompression method according to a reference example.

[0023] Figure 7 A to C are diagrams illustrating a decompression method according to a reference example.

[0024] Figure 8 A and B are diagrams illustrating a decompression method according to a reference example.

[0025] Figure 9 A and B are diagrams illustrating a decompression method according to a reference example.

[0026] Figure 10 A configuration example of the compression device according to the first embodiment is shown.

[0027] Figure 11 FIG. 4 is a flowchart showing an example of processing of a serializer.

[0028] Figure 12 A table showing the relationship between the compression symbol, Cmark bit, and data mask and the output of the serializer.

[0029] Figure 13 A configuration example of a compressor is shown.

[0030] Figure 14 An example of the data structure of the conversion table is shown.

[0031] Figure 15 2 is a flowchart showing an example of processing of the compressor 11 .

[0032] Figure 16 A to C are diagrams for explaining a first operation method of the conversion table.

[0033] Figure 17 A to C are diagrams for explaining the second operation method of the conversion table.

[0034] Figure 18 A to C show examples of the first entropy calculation method.

[0035] Figure 19 A configuration example of a decompression device according to the first embodiment is shown.

[0036] Figure 20 A configuration example of a decompressor is shown.

[0037] Figure 21 FIG. 4 is a flowchart showing an example of processing of a deserializer.

[0038] Figure 22 Flowchart showing an example of processing of the decompressor.

[0039] Figure 23 A to C are explanatory diagrams of operating examples of the compression device.

[0040] Figure 24A to C are explanatory diagrams of operating examples of the compression device.

[0041] Figure 25 A to C are explanatory diagrams of operating examples of the compression device.

[0042] Figure 26 A to C are explanatory diagrams of operating examples of the compression device.

[0043] Figure 27 A to C are explanatory diagrams of operating examples of the compression device.

[0044] Figure 28 This is an explanatory diagram of an example of the operation of the compression device.

[0045] Figure 29 A to C are explanatory diagrams of an example of the operation of the decompression device.

[0046] Figure 30 A to C are explanatory diagrams of an example of the operation of the decompression device.

[0047] Figure 31 A to C are explanatory diagrams of an example of the operation of the decompression device.

[0048] Figure 32 A to C are explanatory diagrams of an example of the operation of the decompression device.

[0049] Figure 33 A to C are explanatory diagrams of an example of the operation of the decompression device.

[0050] Figure 34 This is an explanatory diagram of an example of the operation of the decompression device.

[0051] Figure 35 An example of entropy culling in the second embodiment is shown.

[0052] Figure 36 It is a graph which shows the result of an experiment.

[0053] Figure 37 A to C are illustrations of exception symbols.

[0054] Figure 38 A to C show methods of sending instructions from the compression device to the decompression device without reserving entries.

[0055] Figure 39 This is a table summarizing the first to fourth sending methods.

[0056] Figure 40 A timing chart is shown when an exception symbol is used.

[0057] Figure 41 A to C are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0058] Figure 42 A to C are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0059] Figure 43 A to C are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0060] Figure 44 A to C are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0061] Figure 45 A to C are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0062] Figure 46 A and B are explanatory diagrams of an operation example of the compression device according to the third embodiment.

[0063] Figure 47 A to C are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0064] Figure 48 A to C are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0065] Figure 49 A to C are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0066] Figure 50 A to C are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0067] Figure 51 A to C are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0068] Figure 52 A and B are explanatory diagrams of an operation example of the decompression device according to the third embodiment.

[0069] Figure 53 A to C show operation examples of the compression device according to the fourth embodiment.

[0070] Figure 54 A to C show operation examples of the compression device according to the fourth embodiment.

[0071] Figure 55 A to C show operation examples of the compression device according to the fourth embodiment.

[0072] Figure 56 A to C show operation examples of the compression device according to the fourth embodiment.

[0073] Figure 57 A to C show operation examples of the compression device according to the fourth embodiment.

[0074] Figure 58 An operation example of the compression device according to the fourth embodiment is shown.

[0075] Figure 59 A to C show operation examples of the decompression device according to the fourth embodiment.

[0076] Figure 60 A to C show operation examples of the decompression method according to the fourth embodiment.

[0077] Figure 61 A to C show operation examples of the decompression device according to the fourth embodiment.

[0078] Figure 62 A to C show operation examples of the decompression device according to the fourth embodiment.

[0079] Figure 63 A to C show operation examples of the decompression method according to the fourth embodiment.

[0080] Figure 64 An operation example of the decompression device according to the fourth embodiment is shown.

[0081] Figure 65 A to C show operation examples of the compression device according to the fifth embodiment.

[0082] Figure 66 A to C show operation examples of the compression device according to the fifth embodiment.

[0083] Figure 67 A to C show operation examples of the compression device according to the fifth embodiment.

[0084] Figure 68 A to C show operation examples of the decompression method according to the fifth embodiment.

[0085] Figure 69 A to C show operation examples of the decompression method according to the fifth embodiment.

[0086] Figure 70 A to C show operation examples of the decompression method according to the fifth embodiment.

[0087] Figure 71 A compression device according to a sixth embodiment is shown.

[0088] Figure 72 A decompression device according to a sixth embodiment is shown.

[0089] Figure 73 A and B are explanatory diagrams of the seventh embodiment.

[0090] Figure 74 A compression device according to an eighth embodiment is shown.

[0091] Figure 75 A decompression device according to an eighth embodiment is shown.

[0092] Figure 76 A configuration example of a terminal device applicable to the compression device and the decompression device of the first to eighth embodiments is shown.

[0093] Figure 77 A circuit configuration example of a compression device is shown.

[0094] Figure 78 A circuit configuration example of a decompression device is shown.

[0095] Figure 79 This is a flowchart showing an example of processing by the compressor according to the tenth embodiment.

[0096] Figure 80 This is a flowchart showing an example of processing of the decompressor according to the tenth embodiment.

[0097] Figure 81 A and B are diagrams for explaining the second calculation method.

[0098] Figure 82 A and B are diagrams for explaining the second calculation method.

[0099] Figure 83 A and B are diagrams for explaining the second calculation method.

[0100] Figure 84 A and B are diagrams for explaining the second calculation method.

[0101] Figure 85 A and B are diagrams for explaining the second calculation method.

[0102] Figure 86 This is an illustration of the second calculation method.

[0103] Figure 87 A and B are explanatory diagrams of the eleventh embodiment. DETAILED DESCRIPTION

[0104] The data compression and decompression methods of the embodiment include the following.

[0105] (1) The compression device performs the following processing: when the input symbol is not logged in a first table having a plurality of entries, the symbol is logged in one of the plurality of entries and indicator data representing non-compressed information and the symbol is output; when the symbol is logged in the table, the compression device outputs indicator data representing compression and position information having a size smaller than the size of the symbol and indicating the position of the entry in which the symbol is logged; and the size of the position information is changed according to the usage status of the plurality of entries.

[0106] (2) The decompression device performs the following processing: when receiving the indicator data representing the non-compressed data and the symbol, the symbol is logged in a second table having the same data structure as the first table in the same way as the symbol is logged in the compression device, and the processing of outputting the symbol; and when receiving the indicator data representing the compressed data and the position information, the symbol of the entry logged in the second table represented by the position information is read and output.

[0107] The compression device of the embodiment may calculate the number of bits expressing the position information based on the information indicating the usage status of the plurality of entries of the first table, and output the position information expressed by the number of bits. In this case, the decompression device may calculate the number of bits expressing the position information based on the information indicating the usage status of the plurality of entries of the second table, and extract the position information from the bit stream input to the decompression device using the number of bits.

[0108] The compression device of the embodiment may calculate information indicating the usage status of the plurality of entries in the first table using the number k of entries in use in the first table and the following formula 1, and the decompression device may calculate information indicating the usage status of the plurality of entries in the second table using the number k of entries in use in the second table and the following formula 1.

[0109] Formula 1: ceil(log2k).

[0110] Alternatively, the compression device of the embodiment may calculate information indicating the usage status of the plurality of entries of the first table using the usage rate of the first table and the hit ratio of the entries to which the symbols are registered as a result of the compression processing of the predetermined number of symbols, and the following formula 2. In this case, the decompression device may calculate information indicating the usage status of the plurality of entries of the second table using the usage rate of the first table and the hit ratio of the entries to which the symbols are registered as a result of the decompression processing of the predetermined number of symbols, and the following formula 2.

[0111] Formula 2: ceil(log2((usage rate / hit rate)*number of entries)).

[0112] For example, when the size of the symbol is N bits and the original size of the position information is M bits, a data mask of M bits representing the number of valid bits corresponding to information representing the usage status of multiple entries and less than the number of valid bits of N can also be generated, and invalid bits can be removed from the original size position information based on the data mask, thereby generating position information expressed by the valid bit number.

[0113] The above-mentioned position information can be, for example, index numbers assigned in sequence to multiple entries in the first table and the second table starting from the first entry. In this case, when an entry with a symbol is hit in a search of the first table of symbols, the compression device can move the symbol to the first entry of the first table, and move the symbol logged in the entry between the first entry of the first table and the previous entry of the hit entry to the next entry. In this case, when an entry with a symbol is hit in a search of the second table of symbols, the decompression device can move the symbol to the first entry of the second table, and move the symbol logged in the entry between the first entry of the second table and the previous entry of the hit entry to the next entry. The first entry can be a reserved entry.

[0114] If a hit is found in an entry in which a symbol is registered during a search of the first table of symbols, the compression device of the embodiment may register the symbol registered in the hit entry in a predetermined entry to be moved closer to the beginning of the hit entry, and move the symbol registered in an entry between the move destination entry and the entry immediately preceding the hit entry to the next entry. In this case, if a hit is found in an entry in which a symbol is registered during a search of the second table of symbols, the decompression device may register the symbol in the hit entry in a predetermined entry to be moved closer to the beginning of the hit entry, and move the symbol registered in an entry between the move destination entry and the entry immediately preceding the hit entry to the next entry.

[0115] The aforementioned specified entry to be moved may also be the first entry in the first table or the second table. Furthermore, in the first table or the second table, the specified entry to be moved may also be an entry located a specified number of times backtracked from the hit entry toward the beginning. In this case, if the position after backtracking the specified number of times exceeds the beginning, the compression device and the decompression device may set the first entry as the entry to be moved. The specified entry to be moved may be a reserved entry.

[0116] If all entries in the first table are in use and the symbol entry registered therein is not found during a search of the first table for a symbol, the compression device of the embodiment may register the symbol in the first entry of the first table, move the symbols registered in entries between the first entry and the entry immediately preceding the last entry in the first table to the next entry, and delete the symbol registered in the last entry. In this case, if all entries in the second table are in use and the symbol entry registered therein is not found during a search of the second table for a symbol, the decompression device may register the symbol in the first entry of the second table, move the symbols registered in entries between the first entry and the entry immediately preceding the last entry in the second table to the next entry, and delete the symbol registered in the last entry.

[0117] In the case where the entry with the symbol is not hit in the search of the first table of symbols, if the first entry in the first table is in an empty state, the compression device of the embodiment may log the symbol in the first entry in the first table, and if all entries in the first table are in use, the compression device of the embodiment may overwrite the first entry logged in the first table with the symbol. In this case, in the case where the entry with the symbol is not hit in the search of the second table of symbols, if the first entry in the second table is in an empty state, the decompression device may log the symbol in the first entry in the second table, and if all entries in the second table are in use, the decompression device may overwrite the first entry logged in the second table with the symbol. For example, the first entry in the first table is the entry at the end of the first table, and the first entry in the second table is the entry at the end of the second table. However, other entries may also be set as the first entry.

[0118] Regarding the first table, when the number of hits or misses in the signed entries reaches a predetermined value, the compression device of the embodiment may delete the symbol in the entry with the largest index number among the signed entries. In this case, regarding the second table, when the number of hits or misses in the signed entries reaches a predetermined value, the decompression device deletes the symbol in the entry with the largest index number among the signed entries.

[0119] Regarding the first table, if the entry with the largest index number corresponds to an entry within a predetermined range from the beginning, the compression device of the embodiment may not delete the symbol in the entry with the largest index number. In this case, regarding the second table, if the entry with the largest index number corresponds to an entry within the predetermined range from the beginning, the decompression device may not delete the symbol in the entry with the largest index number.

[0120] Furthermore, in an embodiment, when a command symbol indicating a command is registered in the same specified entry in both the first table and the second table, the compression device may output index data indicating compression and location information indicating the specified entry, and execute the command indicated by the command symbol. In this case, the decompression device reads the command symbol registered in the specified entry in the second table based on the index data indicating compression and location information indicating the specified entry received from the compression device, and executes the command indicated by the command symbol.

[0121] In an embodiment, when a command symbol representing a command to be executed by the decompression device is registered in the same predetermined entry in both the first table and the second table, the compression device may output uncompressed indicator data and the command symbol. In this case, during the registration process of the command symbol based on the uncompressed indicator data, the decompression device executes the command represented by the command symbol as an exception to the case where the command symbol is already registered in the second table.

[0122] When the decompression device is caused to execute a command, the compression device of an embodiment may output index data indicating compression and location information of an entry indicating an empty state of the first table. In this case, when reading a symbol based on the index data indicating compression and the location information received from the compression device, if an exception occurs due to the symbol not being registered in the entry of the second table indicated by the location information, the decompression device may obtain information indicating the command and execute the command.

[0123] The compression device of the embodiment may output index data indicating compression and location information of an entry indicating an empty state of the first table, and then output index data indicating non-compression and a command symbol indicating a command. In this case, the decompression device executes the command indicated by the command symbol when an exception occurs.

[0124] Furthermore, when the decompression device is caused to execute a command, the compression device of the embodiment may output index data indicating non-compression and a symbol registered in the first table. In this case, during the registration process of the symbol based on the index data indicating non-compression received from the compression device, if an exception occurs due to the same symbol being registered in the second table, the decompression device obtains information indicating the command and executes the command.

[0125] Furthermore, the compression device of the embodiment may output the indicator data indicating non-compression and the symbol registered in the first table, and then output the indicator data indicating non-compression and the command symbol indicating the command. In this case, the decompression device executes the command indicated by the command symbol when an exception occurs.

[0126] A configuration can be employed in which the symbols are used to form a symbol sequence compressed by another compression device located upstream of the compression device, and the symbols output by the decompression device are input as part of the symbol sequence to another decompression device located downstream of the decompression device. In this manner, a cascade connection between the compression device and the decompression device is possible.

[0127] A configuration may be adopted in which the first table and the second table are one of a plurality of banks obtained by partitioning the table, and the first table and the second table are selected using the same hash function.

[0128] In addition, the compression device and the decompression device can also perform the following communication related to encryption. That is, the compression device sends a common key to the decompression device, wherein the common key includes a combination of two or more parameters selected from a plurality of parameters set for the compression processing of the symbol. Afterwards, the compression device uses the common key to encrypt the combination of the indicator data representing the uncompressed and the symbol and the combination of the indicator data representing the compressed and the position information, and sends the encrypted result to the decompression device. In order to decompress the output symbol, the decompression device uses the combination of the indicator data representing the uncompressed and the symbol or the combination of the indicator data representing the compressed and the position information to set two or more parameters in the common key sent from the compression device, and uses the common key to decode the encrypted result and perform decompression processing on the decoded result.

[0129] Although described later, multiple parameters may be the number of bits N of the symbol, the number of bits M of the result of the compression processing of the symbol (symbol or position information), the unit K representing the number of bits output from the compression device, the number of hits or misses used for entropy culling, the setting of exception symbols, the type of scrambling operation, the scrambling key, the adjacent entry exchange offset value k, the library structure (number of libraries), etc.

[0130] In addition, before the encryption result from the compression device is sent, the compression device can initialize the state of the first table and send information for initializing the state of the second table to the decompression device, and the decompression device initializes the state of the second table based on the above-mentioned initialization information.

[0131] [Reference example]

[0132] Before describing the embodiment of the present invention, a compressor and decompressor (compression and decompression methods) of a reference example will be described. Figure 1The conversion table provided in the compressor and decompressor of the reference example is schematically shown. The conversion table is composed of a plurality of entries having an index. As the number of entries, an appropriate number of the same number is determined for the compressor and the decompressor. The maximum value of the number of entries is the number obtained by adding 1 to the maximum value of the index. Figure 1 In the example shown, the index values ​​are 0 to 3 and the number of entries is 4.

[0133] The symbol and count value before compression are registered in the entry. A registration pointer and an erasure pointer are set in the conversion table. The initial positions of the registration pointer and the erasure pointer are index "0". The registration pointer shows the entry position where the unregistered pre-compression entry is registered. If a symbol is registered in the entry pointed to by the registration pointer, the registration pointer points to the next unregistered entry, so the registration pointer moves in the direction where the index value becomes larger. However, in the case where the current position of the registration pointer is the last entry (the entry with index "3" in the reference example), the registration pointer returns to index "0" and is set to the unregistered entry position.

[0134] The delete pointer indicates the entry with the count value decreased. The count value is used for the aging process of the entry. When the count value becomes 0, the entry's registered content (pre-compression symbol) is deleted and the entry becomes unregistered. When the pre-compression symbol is registered in the entry, the initial value of the count value is set (in Figure 1 In the example, it's 2. The count value of the entry pointed to by the delete pointer is decremented by 1. At this point, the delete pointer moves one position toward the next larger index. However, if the delete pointer is currently at the last entry (the entry with index "3"), it returns to index 0. If an entry is hit, the index value of that entry is incremented by 1. The delete pointer can move in a round robin fashion.

[0135] <Operation Example of Compressor of Reference Example>

[0136] Next, an example of the operation of the compressor (compression method) is shown. Figure 2 A~C, Figure 3 A~C, Figure 4 A and B, Figure 5 A and B are diagrams illustrating the compression method of the reference example. Figure 2 A shows a conversion table of a working example. Figure 1The structure is described. The total number of entries in the conversion table is 4, and the initial value of the count value is 2. As an example, the input is a data stream connected by 8-bit (1-byte) data (symbols). In the conversion table in the initial state, all entries are in an unregistered state. When the conversion table is in the initial state, the login pointer and the delete pointer point to the entry with index "0". In the following description, there is a case where an entry is specified by an index value (for example, an entry with index value "0" is simply referred to as index "0").

[0137] Assume that, with the conversion table in its initial state, a pre-compression symbol string (also referred to as "original symbol") "ABAC0ADBCFGDEDA1AB..." is input to the compressor. The compressor performs compression processing on every two symbols in the symbol string. Figure 2 A shows the processing of the first symbol string "AB" in the symbol string. In this case, the symbol string "AB" is searched in the conversion table. However, the symbol string "AB" is not registered in the conversion table ("AB" does not hit). In this case, the original symbol string "AB" and the initial value "2" of the count value are registered (stored) in the entry pointed to by the registration pointer (index "0"). At this time, as the output of the compressor (the symbol after the compression process), the original symbol string "AB" is output as it is. In addition, a deletion pointer is set at the index "0" where the symbol is newly registered, and the registration pointer advances to the index "1" which is the next unregistered entry.

[0138] Figure 2 B shows the processing of the original symbol string "AC" following the symbol string "AB". The symbol "AC" is not registered in the conversion table. Therefore, the original symbol string "AC" and the count value "2" are registered in the entry pointed to by the registration pointer (index "1"). In addition, the original symbol string "AC" is output from the compressor. In addition, the registration pointer advances to the next unregistered entry (index "2"). In addition, the count value of index "0" is decremented by 1 (2→1), and the deletion pointer advances to the next index "1".

[0139] Figure 2C shows the processing of the original symbol string "AB" following the symbol string "AC". The symbol string "AB" has been logged in, so the symbol string "AB" is retrieved in the conversion table (hit). In this case, the index value "0" of the entry where the symbol string "AB" is logged in is output as the compressed symbol. Thus, the 2-byte original symbol string is compressed into a 1-byte compressed symbol. At this time, the count value of the index "0" is incremented (1→2). In addition, the count value of the index "1" pointed to by the delete pointer is decremented (2→1), and the delete pointer advances to the index "0". In addition, the login pointer advances to the index "2" which is the next unlogged entry.

[0140] Figure 3 A shows the processing of the original symbol string "AD" following the symbol string "AB." The symbol string "AD" is not registered in the conversion table. Therefore, the original symbol string "AD" and the count value "2" are registered in the entry pointed to by the registration pointer (index "2"). The registration pointer advances to the next index "3." Furthermore, the count value of index "0" pointed to by the delete pointer is decremented by 1 (2 → 1), and the delete pointer advances to the next index "1."

[0141] Figure 3 B shows the processing of the original symbol string "BC" following the symbol string "AD". The symbol string "BC" is not registered in the conversion table. Therefore, the original symbol string "BC" and the count value "2" are registered in the entry pointed to by the registration pointer (index "3"). The original symbol string "BC" is output from the compressor. In addition, the count value of index "1" pointed to by the deletion pointer is decremented, and the deletion pointer advances to the next index "2". At index "1", the count value becomes "0" and the symbol "AC" is deleted, and index "1" becomes unregistered, and the registration pointer is set here.

[0142] Figure 3 C shows the processing of the original symbol string "FG" following the symbol string "BC". The symbol string "FG" is not registered in the conversion table. Therefore, the original symbol string "FG" and the count value "2" are registered in the entry pointed to by the registration pointer (index "1"). The original symbol string "FG" is output from the compressor. At this point in time, all entries of the conversion table have been registered (there are no empty entries). In this case, the registration pointer can point to any entry. However, for the sake of convenience, in Figure 3 In the example shown in C, the index value advances one position as it increases, pointing to the next index "2". In addition, the count value of the index "2" pointed to by the delete pointer is decremented, and the delete pointer advances to the next index "3".

[0143] Figure 4A shows the processing of the original symbol string "DE" following the symbol string "FG". The symbol string "DE" is not logged in the conversion table. However, the conversion table is full (there are no empty entries), so the symbol string "DE" cannot be logged in. In this case, the login process is not performed, and the input symbol string "DE" is output as is. This maintains throughput. In addition, the count value of the entry pointed to by the deletion pointer (index "3") is decremented, and the deletion pointer advances to the next position (index "0"). In this case, the position of the login pointer can also be an arbitrary position. In Figure 4 In the example shown in A, the index "3" is pointed to as an example.

[0144] Figure 4 B shows the processing of the original symbol string "DA" following the symbol "DE." The symbol string "DA" is not registered in the conversion table. However, the conversion table does not have an empty entry. Therefore, without registering the symbol string "DA," the symbol string "DA" is output to maintain throughput. At this point, the count value of index "0" pointed to by the delete pointer is decremented (1 → 0), and the delete pointer advances to index "1." The count value of index "0" is decremented to 0, and index "0" becomes unregistered, and the registration pointer is set at this point.

[0145] Figure 5 A shows the processing of the original symbol string "FG" following the symbol "DA." The symbol "FG" is already registered in the conversion table. Therefore, the corresponding entry index value "1" is output. At this point, index "1" is incremented and decremented, and the count value remains at "2." The delete pointer advances to index "2." The registration pointer does not move.

[0146] Figure 5 B shows the processing of the original symbol string "AB" following the symbol string "FG." The symbol string "AB" is not registered in the conversion table. Therefore, the symbol string "AB" is output. In addition, the symbol string "AB" and the count value "2" are registered at index "0." Furthermore, the count value of index "2" pointed to by the delete pointer is decremented by 1 (1→0), and the delete pointer advances to index "3." As a result, the count value of index "2" becomes 0, and the entry becomes unregistered, and the registration pointer is set there. In this way, the compressed symbol string "ABAC0ADBCFGDEDA0AB..." is output from the compressor.

[0147] <Working Example of Decompressor in Reference Example>

[0148] Next, an example of the operation of the decompressor (decompression method) will be described: The data stream (symbol string) "ABAC0ADBCFGDEDA0AB..." output from the compressor is input to the decompressor. Figure 6 A~C, Figure 7 A~C, Figure 8 A and B, Figure 9 A and B are diagrams illustrating a decompression method according to a reference example. Figure 6 A shows the conversion table of the decompressor. The structure of the conversion table is the same as that of the compressor. Figure 6 A shows the processing of the symbol string "AB" input to the decompressor when the conversion table of the decompressor is in the initial state.

[0149] Initially, index "A" is searched from the conversion table. However, index "A" misses, indicating that index "A" is out of range or unregistered. In this case, the next input symbol is read and output as is. Here, the symbol string "AB," consisting of symbol "A" and symbol "B" following it, is output as the decompression result. Furthermore, the symbol string "AB" and the count value "2" are registered at index "0." Furthermore, a delete pointer is set at index "0," and the registration pointer advances to index "1."

[0150] Figure 6 B shows the processing of the subsequent symbol string "AC". In this case, the index of the conversion table that matches the symbol "A" is also searched. However, no corresponding index is found. Therefore, the symbol string "AC" containing the next symbol "C" is output as is. In addition, the symbol string "AC" and the count value "2" are logged in the entry pointed to by the login pointer (index "1"), and the login pointer advances to the next index "2". In addition, after the count value of index "0" is reduced by 1, the deletion pointer advances to index "1".

[0151] Figure 6 C shows the subsequent processing of symbol "0." In this case, the corresponding index "0" is found in the conversion table. In this case, the decompressor outputs the symbol string "AB" registered in the entry at index "0." At this point, the counter value at index "0" is incremented by 1 (1 → 2), and a delete pointer is set at index "0." Furthermore, the registration pointer remains at index "2."

[0152] Figure 7 A shows the processing of the subsequent symbol string "AD". At this time, there is no index in the conversion table that matches the symbol "A". Therefore, the decompressor outputs the symbol string "AD" consisting of the symbol "A" and the symbol "D" immediately following the symbol "A". In addition, the symbol string "AD" and the count value "2" are logged in the entry pointed to by the login pointer (index "2"). The login pointer advances to the next index "3". In addition, the count value of the index "0" pointed to by the delete pointer is reduced by 1, and the delete pointer advances to the next index value "1".

[0153] Figure 7 B shows the processing of the subsequent symbol string "BC". In this case, there is no index to retrieve the conversion table corresponding to the symbol "B". Therefore, the symbol string "BC" consisting of the symbol "B" and the symbol "C" following the symbol "B" is output from the decompressor. In addition, the symbol string "BC" and the count value "2" are logged in the entry pointed to by the login pointer (index "3"). In addition, the count value of the index "1" pointed to by the deletion pointer is reduced by 1 (1→0), and the deletion pointer advances to the next index "2". The count value of the index "1" becomes 0, so the entry of the index "1" becomes unlogged. The login pointer is set to index "1".

[0154] Figure 7 C shows the processing of the subsequent symbol string "FG". In this case, there is no index that matches the symbol "F". Therefore, the symbol string "FG" consisting of the symbol "F" and the symbol "G" following the symbol "F" is output from the decompressor. In addition, the symbol string "FG" and the count value "2" are logged in the entry pointed to by the login pointer (index "1"). In addition, the count value of the index "2" pointed to by the deletion pointer is reduced by 1, and the deletion pointer advances to the next index "3". Since the conversion table is full, the position of the login pointer can be arbitrary. However, in this working example, an example is shown in which the login pointer advances one position regardless of whether it is logged in or not. Figure 7 C shows an example of the case of proceeding to index "2".

[0155] Figure 8 A shows the processing of the subsequent symbol string "DE". In this case, there is no index corresponding to the symbol "D". Therefore, the symbol string "DE" consisting of the symbol "D" and the symbol "E" following the symbol "D" is output from the decompressor. However, the conversion table is full, so the symbol string "DE" is not logged in. The count value of the index "3" pointed to by the deletion pointer is reduced by 1, and the deletion pointer returns to the index "0". The position of the login pointer can be arbitrary. Figure 8 A shows an example in which the registration pointer advances to index "3" according to the rule of advancing the registration pointer by one position from the current position.

[0156] Figure 8 B shows the subsequent processing of the symbol string "DA". In this case, there is no index matching the symbol "D". Therefore, the symbol string "DA" consisting of the symbol "D" and the symbol "A" is output. However, there is no empty entry in the conversion table, so the symbol "DA" is not registered. At this time, the count value of index "0" pointed to by the delete pointer is reduced by 1, and the delete pointer advances to index "1". The count value of index "0" becomes 0, and index "0" becomes unregistered, and the registration pointer is set here.

[0157] Figure 9 A shows the subsequent processing of symbol "1." In this case, a matching index "1" exists in the conversion table. Therefore, the decompressor outputs the symbol string "FG" registered in the entry at index "1." At this point, the count value of index "1," pointed to by the delete pointer, is decremented and incremented, bringing the count value of index "1" to "2." The delete pointer advances to index "2," and the registered count value points to index "0."

[0158] Figure 9 B shows the processing of the subsequent symbol string "AB." In this case, symbol "A" is not registered in the conversion table. Therefore, the decompressor outputs the symbol string "AB," consisting of symbol "A" and symbol "B" following it. Furthermore, the symbol string "AB" and the count value "2" are registered at index "0," which is an empty entry. At this point, the count value of index "2," pointed to by the delete pointer, is decremented by 1, and the delete pointer advances to index "3." The count value of the entry at index "2" becomes 0, so index "2" becomes unregistered, and the registration pointer is set there.

[0159] In the reference example described above, even though the entry contents of the conversion table in the compressor are not shown, a conversion table having the same entry contents as those of the compressor can be generated in the decompressor and decompression processing can be performed using the conversion table.

[0160] In addition, in the working example of the reference example, it is assumed that the compressed symbol (for example, "0") is not used for the symbol before compression. However, in reality, all combinations of 8-bit data (256 types) are generally used. Therefore, it is impossible to distinguish between the original symbol "0" and the compressed "0". Therefore, for the compressed symbol or symbol string, a bit (bit) called "Cmark bit" is added to indicate compression (conversion) / non-compression (non-conversion). The value "0" of the Cmark bit indicates non-compression, and the value "1" indicates compression. However, it can also be set in the opposite way.

[0161] <Issues Related to Reference Examples>

[0162] <<Question 1>>

[0163] In the compression and decompression method of the reference example, the length of the compressed symbol is fixed. As shown in the example, when converting two input symbols into one symbol, the maximum compression rate is only 50%. Therefore, it is desirable to further improve the compression rate.

[0164] Here, we consider Shannon's information entropy (also known as Shannon information quantity or entropy). Information entropy is an indicator of the "complexity of data" and is expressed by the following formula (1). In formula (1), i represents data and pi represents the occurrence rate of data i.

[0165] [Number 1]

[0166] Average information content H = -Σ i p i log2(pi)…(1)

[0167] For example, in the case where the data symbol string (one symbol is 8 bits) is "ABACABADBC", the probability of occurrence of each of the symbols "A", "B", "C" and "D" is as follows.

[0168] Probability of A appearing: 4 / 10 = 0.4

[0169] The probability of B appearing: 3 / 10 = 0.3

[0170] The probability of C appearing: 2 / 10 = 0.2

[0171] The probability of D appearing: 1 / 10 = 0.1.

[0172] Using equation (1) to calculate the average information content H of the data symbol string, H = 1.84643934465. In other words, the data symbol string is composed of combinations of 2 raised to the power of 1.84643934465, and can be represented using 1.84643934465 bits. Each element (symbol) of this data string has Ceil(1.84643934465) = 2, so it can be represented using 2 bits.

[0173] For example, when A=00, B=01, C=10, and D=11 are defined, the data symbol string becomes “00010010000100110110.” 8-bit data can be compressed to 2 bits, so the data amount is reduced to 1 / 4.

[0174] <<Question 2>>

[0175] In the compression and decompression methods of the reference examples above, the end of the compressed data is unknown. If a special code can be embedded, the end of the compressed data stream can be notified to the decompressor.

[0176] The inventors of this application used the above-mentioned concept of average information size (entropy) to consider whether the compression rate could be improved by changing the compressed symbol length according to the usage rate of the conversion table. As a result of their active efforts, the inventors invented the compression and decompression methods shown in the following embodiments.

[0177] [Implementation Method]

[0178] Hereinafter, embodiments of a data compression and decompression method, a data compression method, a data compression device, a data compression program, a data decompression method, a data decompression device, and a data decompression program will be described with reference to the accompanying drawings. The configurations of the embodiments are merely examples, and the present invention is not limited to the configurations of the embodiments.

[0179] [Implementation Method 1]

[0180] <Configuration of Compression Device>

[0181] Figure 10 An example of the configuration of the compression device of the first embodiment is shown. Figure 10 In the embodiment, the compression device 10 includes a compressor 11 and a serializer 12. N bits (N is a positive integer) of original symbol data are input to the compressor 11. The compressor 11 outputs M bits (M is a positive integer) of compressed symbols, Cmark bits and M bits of data mask. In the following description of the embodiment, the description is centered on the case where N=M is ​​set. However, there may be cases where N<M or N>M. If M is set to "log2 (number of entries)", when the number of entries is greater than 2 to the power of N, N<M. In the opposite case, N>M.

[0182] The compression symbol represents the symbol data after compression processing output from the compressor 11. The Cmark bit is a bit (bit) that indicates whether the symbol data output from the compressor 11 is compressed by the compressor 11. As an example, the case where the bit value is "0" indicates non-compression, and the case where the bit value is "1" indicates compression. The meaning of the bit value may also be the opposite. The data mask is used to represent the number of valid bits (digits) or the number of valid bits in the bit stream (bit string) that forms the compression symbol. For example, the valid mask represents a valid digit with "1". In addition, the data mask may also be a bit stream that represents the number of valid bits.

[0183] The serializer 12 receives the compressed symbol, the Cmark bit, and the data mask, and outputs data consisting of the Cmark bit and the valid bits in the compressed symbol represented by the data mask. This output data becomes the transmission data sent to the decompression device. Even when the output from the compressor 11 is N>M, the number of valid bits represented by the data mask can reach N. Therefore, for an N-bit original symbol, the output of the compression device 10 is at most N+1 bits. The transmission data is sent to the decompression device via a transmission path (network).

[0184] <<Serializer>>

[0185] Figure 111 is a flowchart showing an example of processing by the serializer 12. In S1, the serializer 12 removes unnecessary (invalid) bits from the compressed symbol based on the data mask. That is, the serializer 12 cuts off the portion corresponding to the digit indicated by "1" in the data mask from the compressed symbol.

[0186] In S2, the serializer 12 adds a Cmark bit to the most significant bit of the pruned compressed symbol portion. In S3, the serializer 12 outputs the Cmark bit and the pruned compressed symbol in K bits at a time according to appropriate rules.

[0187] Figure 12 This table illustrates the relationship between the compression symbol, Cmark bit, and data mask, and the output of the serializer. For example, assume the following case: in the case of big endian, the compression symbol data, Cmark bit, and data mask stream are "0001000" (M=7), "1", and "0011111" (M=7), respectively. In this case, the data mask shows the least significant bit (LSB) to the fifth bit as valid bits. Therefore, in the serializer 12, the most significant bit (MSB) to the second bit are removed from the compression symbol, and the bit stream (serial data) "101000" with the Cmark bit "1" and the valid bit stream "01000" is output.

[0188] When the output from the next compressor 11 is the compression symbol data "1110100", the Cmark bit "0", and the data mask "1111111", the output of the serializer 12 becomes the serial data "01110100" with the Cmark bit "1" and the valid bit "1110100". Figure 12 The output of the serializer 12 associated with other combinations of compression symbols and Cmark bits is also shown as an example.

[0189] <<Compressor>>

[0190] Figure 13 : shows a configuration example of the compressor 11. The compressor 11 includes a sign conversion section 111, an entropy calculation section 112, and a mask generation section 113. The sign conversion section 111 performs sign conversion using a conversion table.

[0191] Figure 14 The following shows an example of the data structure of the conversion table provided by the compression device and the decompression device. The conversion table is composed of a plurality of entries. In the plurality of entries, an index number (index value) with a numerical value increasing from the first entry is assigned in sequence. If the longest number of bits of the compressed symbol is set to X (X is a positive integer), the number of entries is 2 X . Figure 14The example of the conversion table shown shows the case where X = 2, resulting in four entries. In the initial state of the conversion table, for example, all entries are empty. However, symbols may be set in all entries. The conversion table included in the compression device is an example of the first table, and the conversion table included in the decompression device is an example of the second table. The index number is an example of positional information indicating the position of an entry.

[0192] Entropy calculation unit 112 calculates entropy using a predetermined calculation method. Entropy is information indicating the usage status of multiple entries in the conversion table. Mask generation unit 113 receives the entropy calculation result from entropy calculation unit 112 and generates a corresponding data mask. In this embodiment, the case where N = M = 8 bits is described as an example.

[0193] Figure 15 This is a flowchart showing an example of the processing of the compressor 11. In S11, the original symbol (N bits) is input to the symbol conversion unit 111. The symbol conversion unit 111 then searches the conversion table for an entry in which the original symbol is registered (S12). If the original symbol is registered (a match is found in the entry), the process proceeds to S13. If the original symbol is not registered (a match is not found in the entry), the process proceeds to S14.

[0194] When the processing enters S13, the symbol conversion unit 111 outputs the index value of the entry logged with the original symbol as a compressed symbol. Then, the processing enters S15. The index value changes the number of bits required for expression according to its own value. For example, when the index value of the hit entry is "0" or "1", the index value can be expressed by 1 bit (1bit). In this embodiment, the effective number of bits to express the index value is determined based on the usage of the conversion table, and the effective number of bits is represented by the data mask. In the serializer 12, the index value (M bits) output from the compressor 11 becomes the effective number of bits represented by the data mask. At this time, the index is converted into a number of bits less than N, so that the data is compressed.

[0195] When the process proceeds to S14, the original symbol itself is output as a compressed symbol. In S15, the symbol conversion unit 111 outputs the Cmark bit corresponding to the compressed symbol. For example, if the original symbol does not hit the conversion table (is not registered in the conversion table), the symbol conversion unit 111 outputs a Cmark bit of "0" indicating non-compression. Conversely, if the original symbol hits (is registered in the conversion table), the symbol conversion unit 111 outputs a Cmark bit of "1" indicating compression.

[0196] In S16, the symbol conversion unit 111 performs an update process of the conversion table. The update process of the conversion table will be described later. In S17, the entropy calculation unit 112 performs entropy calculation. The order of S16 and S17 can also be reversed. In S18, the mask generation unit 113 outputs a data mask corresponding to the entropy calculation result. However, when the Cmark bit is "0", a data mask of all "1"s can be output regardless of the entropy calculation value, or the data mask can be not output (output when the Cmark bit is "1").

[0197] <First Operation Method of Conversion Table>

[0198] Figure 16 A to C are diagrams for explaining a first operation method of the conversion table. Figure 16 A shows the situation where the original symbol hits. Assume that Figure 16 Consider the case where the original symbol "B" is entered in the conversion table as shown in A. In this case, symbol "B" is already registered in the conversion table and is a hit. Symbol conversion unit 111 moves the hit symbol "B" to the first entry. Furthermore, symbol conversion unit 111 outputs the index value "1" of the entry where symbol "B" is registered and the Cmark bit "1" indicating compression.

[0199] Figure 16 B shows the case where there is an empty entry and the original symbol misses. Figure 16 As shown in B, assume that the original symbol "B" is input when the entry of index "3" is an empty entry. In this case, the symbol "B" is not logged in the conversion table, and the symbol "B" becomes a miss. At this time, the symbol conversion unit 111 pushes the entire conversion table so that each logged-in symbol ("A", "C", "D") moves to the position after the index value is added to 1. As a result, the first entry (index "0") becomes empty. The symbol conversion unit 111 logs the symbol "B" in the first entry. In addition, the symbol conversion unit 111 outputs the original symbol "B" and the Cmark bit "0" indicating non-compression.

[0200] Figure 16 C shows the case where there is no empty entry and the original symbol misses. Figure 16As shown in C, it is assumed that the original symbol "B" is input when all entries in the conversion table have symbols logged in (full grid). In this case, the symbol "B" is not logged in the conversion table, and the symbol "B" becomes a miss. At this time, the symbol conversion unit 111 pushes the entire conversion table so that each logged-in symbol ("A", "C", "D", "E") moves to the position after the index value is added to 1. However, the symbol "E" logged in the last entry (index "3") is squeezed out of the conversion table and deleted. The symbol conversion unit 111 logs the symbol "B" in the entry at the beginning that becomes an empty state. In addition, the symbol conversion unit 111 outputs the original symbol "B" and the Cmark bit "0" indicating non-compression.

[0201] <Second Operation Method of Conversion Table>

[0202] Figure 17 A to C are diagrams for explaining the second operation method of the conversion table. Figure 17 A shows the situation where the original symbol hits. Assume that Figure 17 Consider the case where the original symbol "B" is entered into the conversion table as shown in A. In this case, since symbol "B" hits, symbol conversion unit 111 moves symbol "B" to the first entry. Furthermore, symbol conversion unit 111 outputs an index value of "1" and a Cmark bit of "1." This is the same as the first operation method.

[0203] Figure 17 B shows the case where there is an empty entry and the original symbol misses. Figure 17 As shown in Figure B, assume that the original symbol "B" is input when index "3" is an empty entry. In this case, symbol "B" is not registered in the conversion table, and symbol "B" is a miss. In this case, symbol conversion unit 111 registers symbol "B" at index "3" corresponding to a predetermined position in the empty entry (for example, the last empty entry). Symbol conversion unit 111 also outputs the original symbol "B" and Cmark bit "0."

[0204] Figure 17 C shows the case where there is no empty entry and the original symbol misses. Figure 17 As shown in C, assume that the original symbol "B" is input when the conversion table is full. In this case, symbol "B" is a miss. The symbol conversion unit 111 overwrites the registered symbol "B" at a predetermined entry (e.g., the last index "3") (resulting in the symbol "E" being deleted). The symbol conversion unit 111 outputs symbol "B" and Cmark bit "0".

[0205] However, Figure 17 B and Figure 17The example shown in C is an example. For the login position of the missed symbol, as long as the same rules are applied between the compressor and the decompressor, the changes in the login status of the compressor's conversion table can be reproduced in the decompressor's conversion table.

[0206] The symbol conversion unit 111 can perform either the first operation method or the second operation method. Furthermore, the first operation method is preferably implemented using software (program and memory) because the hardware (circuitry) for performing the push operation becomes complex. In contrast, the second operation method is easier to implement using hardware than the first operation method.

[0207] <Method for Calculating Entropy (First Calculation Method)>

[0208] When the original symbol is detected in the conversion table (when the original symbol hits), the compressor 11 outputs a data mask according to the result of the entropy calculation while outputting the Cmark bit "1".

[0209] In the first calculation method, when the original symbol is N bits, an N-bit mask is generated in which bits are set to "1" within the range of values ​​of the ceiling function (i.e., ceil(log2k)) of the base-2 logarithm (binary logarithm) of the number of entries k in use in the conversion table. Specifically, the entropy value E is calculated using the following equation 1.

[0210] Formula 1: E = ceil(log2k)

[0211] For example, when the number of entries in use in the conversion table is 1, ceil(log21) = 0. Furthermore, when the number of entries in use is 2, ceil(log22) = 1. Furthermore, when the number of entries in use is 3, ceil(log23) = 2. Furthermore, when the number of entries in use is 5, ceil(log25) = 3.

[0212] Figure 18 A to C show examples of the first method of calculating entropy. Figure 18 In the examples shown in A to C, the conversion table has entries with an index number of 8 (index values ​​"0" to "7").

[0213] exist Figure 18In the example shown in A, when a sign is registered only at index "0," the number of entries in use is k = 1. Therefore, the entropy calculated by entropy calculation unit 112 is ceil(log21) = 0. In this case, mask generation unit 113 generates and outputs "00000000" as an N-bit data mask. When k = 1, if the Cmark bit is "1," it is clear that a sign is always registered in the entry at index "0." Therefore, index "0" is represented by bit 0, and serializer 12 outputs only the Cmark bit.

[0214] exist Figure 18 In the example shown in B, the indexes "0" to "2" are signed, and the number of entries in use is 3. In this case, the entropy calculation result is ceil(log23)=2, and as a data mask, the two digits starting from the least significant bit in N=8 bits are set to "1" (the significant bit represents the lower 2 bits), and the data mask "00000011" is output. Figure 18 In the example shown in C, the number of entries in use is 5, so the entropy calculation result becomes ceil(log25)=3, and as a data mask, the three digits starting from the least significant bit in N=8 bits are set to "1" (the significant bit represents the lower 3 bits) and the data mask "00000111" is output.

[0215] exist Figure 18 In the conversion tables shown in A to C, when a sign is registered only at index "0", the number of valid bits in the data mask is 0. Furthermore, when a sign is registered at indexes "0" and "1", the number of valid bits in the data mask is 1. When a sign is registered at indexes "0" to "2" or "0" to "3", the number of valid bits in the data mask is 2. When a sign is registered at indexes "0" to "4" or below, the number of valid bits in the data mask is 3.

[0216] <Configuration of Decompression Device>

[0217] Figure 19 FIG. 1 shows an example of a configuration of a decompression device according to the first embodiment. Figure 19 In the embodiment, the decompression device 50 includes a deserializer 51 and a decompressor 52. Transmission data, which is divided into k bits and transmitted, is input to the deserializer 51. The deserializer 51 extracts an M-bit compression symbol and a 1-bit Cmark bit from the transmission data and inputs them to the decompressor 52. The decompressor 52 uses the compression symbol and the Cmark bit to output an M-bit data mask and outputs N-bit original symbol data.

[0218] Figure 20The following is a configuration example of the decompressor 52. The decompressor 52 includes a symbol conversion unit 521, an entropy calculation unit 522, and a mask generation unit 523. The symbol conversion unit 521 includes a conversion table having the same structure as the conversion table included in the compressor 11. The symbol conversion unit 521 receives a compressed symbol and a Cmark bit, and uses these and the conversion table to output the original symbol.

[0219] The entropy calculation unit 522 obtains information indicating the number of entries in use in the conversion table from the sign conversion unit 521, calculates entropy using the same calculation method as that performed by the entropy calculation unit 122 of the compressor 11, and provides the calculation result to the mask generation unit 523. The mask generation unit 523 receives the Cmark bit from the sign conversion unit 521, and if the bit value is "0", it outputs a data mask with all "1" bits. If the bit value is "1", it outputs a data mask with a valid number of bits that conforms to the entropy calculation result from the entropy calculation unit 522. The data mask is input to the deserializer 51.

[0220] Figure 21 2 is a flowchart showing an example of processing of the deserializer 51. In S21, the deserializer 51 reads the first 1 bit (equivalent to the Cmark bit) of the input transmission data.

[0221] In S22, the deserializer 51 determines whether the bit value is "1" or "0". When the ratio is "1", the transmission data of the number of bits represented by the data mask input from the decompressor 52 is read and output as a compressed symbol (S23). In contrast, when the bit value is "0", the deserializer 51 reads the transmission data of N bits and outputs it as a compressed symbol (S24). The output of N bits can also be performed as follows: a data mask indicating that all N bits are valid bits ("11111111": when N=M=8) is input to the deserializer 51 and the deserializer 51 refers to the data mask, or it can be performed according to the definition of the output N bits regardless of the value of the data mask. In the first embodiment, the method of inputting the data mask "11111111" when the Cmark bit is "0" is described.

[0222] In S25, the bit read in S21 is output as the Cmark bit. The process of S25 can be performed before S23 and S24, or before S22. In S26, it is determined whether data transmission has been completed. If no data has been transmitted, the process ends. If data has been transmitted, the process returns to S21.

[0223] Figure 22The following is a flowchart illustrating an example of processing by the decompressor 52. In S31, the symbol conversion unit 521 of the decompressor 52 determines whether the value of the Cmark bit input from the deserializer 51 is "0" or "1." If the value of the Cmark bit is "0" (S31, 0), the symbol conversion unit 521 determines whether the symbol to be registered has already been registered in the conversion table. If it is determined that the symbol to be registered has already been registered (S38, Yes), the decompressor 52 performs specified error handling (S41) and terminates the process.

[0224] On the other hand, if it is determined that no symbol to be registered has been registered (S38, No), the symbol conversion unit 521 performs processing to register the compressed symbol in the conversion table (table update) (S39). The symbol conversion unit 521 then outputs the compressed symbol input from the deserializer 51 as the original symbol (S40). The process then proceeds to S36. However, the order of the processes in S39 and S40 can be reversed or performed in parallel.

[0225] On the other hand, when the value of the Cmark bit is "1" (S31, 1), the symbol conversion unit 521 searches the conversion table for an index that matches the value of the compressed symbol input from the deserializer 51 (S32). The symbol conversion unit 521 determines whether the index matches (S33). If it does not match (S33, No), it performs a predetermined error process (S42) and ends. Figure 22 processing.

[0226] On the other hand, if the index hits (S33, Yes), the symbol conversion unit 521 outputs the symbol in the entry corresponding to the index as the original symbol (S34). In S35, the symbol conversion unit 521 performs table update processing, moves the hit symbol to a predetermined position (index "0"), and simultaneously moves the symbols registered in the entry from index "0" to the entry immediately preceding the entry where the hit symbol is registered to the next entry. The processing of S34 and S35 can be reversed or performed in parallel.

[0227] In S36, each time the original symbol is output, the entropy calculation unit 522 obtains information indicating the usage status of the conversion table (usage rate, hit rate). Regarding the acquisition, the usage rate, etc. can be obtained by referring to the conversion table, or the information indicating the usage rate, etc. can be obtained from the symbol conversion unit 521. The entropy calculation unit 522 performs entropy calculation using the first or second calculation method. The mask generation unit 523 obtains the entropy calculation value, generates a data mask with valid bits corresponding to the entropy calculation value, and provides it to the deserializer 51. Then, the process ends. Figure 22 In addition, in the third embodiment, the processing of S38 and S41, and the processing of S33 and S42 are not necessarily necessary.

[0228] <Working Example>

[0229] <<Compression Method>>

[0230] Figure 23 A~C, Figure 24 A~C, Figure 25 A~C, Figure 26 A~C, Figure 27 A~C, Figure 28 FIG is an explanatory diagram of an operation example (compression method) of the compression device 10. Figure 23 A shows a conversion table of a working example. This conversion table has the following features: Figure 18 A to C illustrate the structure. The total number of entries in the conversion table is 8 (index values ​​"0" to "7"). As an example, the input is a symbol data stream "ABACDABFGEFHJAB" connected by 8-bit original symbols. Assume that all entries in the conversion table in the initial state are in an unregistered state. In the following working example, the conversion table is updated by the first operation method of the conversion table. The update process of the conversion table is performed by the compressor 11 (symbol conversion unit 111). The entropy calculation unit 112 calculates the entropy using the first calculation method. In addition, in this working example, the case where N=M=8 bits is described.

[0231] Figure 23 B shows the processing of the input original symbol "A." The original symbol "A" is not registered in the conversion table (a miss). Therefore, the symbol conversion unit 111 registers the original symbol "A" in the first entry (index "0"). The symbol conversion unit 111 outputs the original symbol "A" as a compressed symbol and outputs the Cmark bit "0" indicating non-compression.

[0232] The mask generation unit 113 outputs a data mask "11111111" indicating that all 8 bits are valid. The serializer 12 performs Figure 11 The processing shown outputs serial data of "0A" (ASCII code: 01000001) followed by the symbol "A" (01000001) at the Cmark bit "0" according to the data mask "11111111." However, the symbol may be represented by a method other than ASCII code.

[0233] Figure 23C shows the processing of the original symbol "B" input after the original symbol "A." Since the original symbol "B" is not registered, the symbol conversion unit 111 performs push processing and registers the symbol "B" at index "0" and the symbol "A" at index "1," the next entry. The symbol conversion unit 111 outputs the symbol "B" and the Cmark bit "0." At this time, the mask generation unit 113 outputs the data mask "11111111." Based on the data mask, the serializer 12 outputs serial data consisting of "0B," which is the Cmark bit "0" followed by the symbol "B" (ASCII code: 01000010).

[0234] Figure 24 A shows the processing of the original symbol "A" input after the original symbol "B". The symbol "A" is already logged in at index "1". Therefore, the symbol "A" hits. In this case, the symbol conversion unit 111 outputs the bit value "1" of the index value "1" representing the entry in which the symbol "A" is logged in as a compression symbol, and outputs the Cmark bit "1" indicating compression. In addition, the symbol conversion unit 111 moves the hit symbol "A" to the first entry (index "0"), and moves the symbol "B" logged in at index "0" to the next entry (index "1").

[0235] In this case, the entropy calculation result in the entropy calculation unit 112 becomes ceil(log22)=1. Therefore, the mask generation unit 113 generates a data mask "00000001" and outputs it. When the symbol is compressed (symbol conversion is performed), when the Cmark bit is "1", the serializer 12 outputs the bit "1" of the effective bit number (=1) indicated by the data mask as a compressed symbol ( Figure 21 , S23). As a result, the serializer 12 outputs 2-bit serial data "11" consisting of the Cmark bit "1" followed by the compression symbol "1".

[0236] Figure 24 B shows the processing of the original symbol "C" input after the symbol "A". The symbol "C" is not registered, so the symbol conversion unit 111 outputs the symbol "C" and the Cmark bit "0" while performing a push process on the symbol "C". That is, the symbol C is registered at index "0" and the registered symbol is moved to the next entry. In this case, the mask generation unit 113 generates a data mask of all "1"s and outputs it. The serializer 12 outputs the serial data "0C" which is the symbol "C" (ASCII code: 01000011) followed by the Cmark bit "0" according to the data mask.

[0237] Figure 24C shows the processing of the original symbol "D" input after the symbol "C." Since the symbol "D" is not registered, the symbol conversion unit 111 outputs the symbol "C" with the Cmark bit set to "0" while performing push processing on the symbol "D." The mask generation unit 113 generates and outputs a data mask consisting of all "1s." The serializer 12 outputs serial data consisting of "0D" (ASCII code: 01000100) followed by the Cmark bit set to "0" based on the data mask.

[0238] Figure 25 A shows the processing of the original symbol "A" input after the symbol "D". The symbol "A" has been registered at the index "2" ( Figure 24 C). Therefore, the symbol conversion unit 111 changes the index value "2" ( Figure 24 C) bit value "10" is output as a compression symbol, and the Cmark bit "1" indicating compression is output. In addition, the symbol conversion unit 111 moves the hit symbol "A" to index "0" and moves the symbols "D", "C", and "B" to the next entry.

[0239] In this case, the entropy calculation result of the entropy calculation unit 112 is 2. Therefore, the mask generation unit 113 generates and outputs the data mask "00000011". Since the Cmark bit is "1", the serializer 12 outputs the bit "10" of the significant digits (=2) indicated by the data mask as the compression code. Therefore, the serializer 12 outputs the three-bit serial data "110" consisting of the Cmark bit "1" followed by the compression code "10".

[0240] Figure 25 B shows the processing of the original symbol "B" input after the symbol "A". The symbol "B" has been registered at the index "3" ( Figure 25 A), the symbol conversion unit 111 outputs the bit value "11" of the index value "3" of the entry where the symbol "B" is registered as the compression symbol, and outputs the Cmark bit "1" indicating compression. Furthermore, the symbol conversion unit 111 moves the symbol "B" to index "0" and simultaneously moves the symbols "A," "D," and "C" to the next entry.

[0241] In this case, the entropy calculation result of entropy calculation unit 112 is 2, and mask generation unit 113 generates and outputs a data mask of "00000011". Since the Cmark bit is "1", serializer 12 outputs the bits corresponding to the number of significant bits (=2) indicated by the data mask as compression codes. Therefore, serializer 12 outputs three bits of serial data "111", which consists of the Cmark bit "1" followed by the compression code "11".

[0242] Figure 25Figure C shows the processing of the original symbol "F" input after symbol "B." Since symbol "F" is not registered, symbol conversion unit 111 outputs symbol "F" with a Cmark bit of "0" while performing push processing on symbol "F." In this case, mask generation unit 113 generates and outputs a data mask of all "1s." Based on the data mask, serializer 12 outputs serial data consisting of "0F" (ASCII code: 01000110) followed by a Cmark bit of "0" followed by the symbol "F."

[0243] Figure 26 Figure A shows the processing of the symbol "G" following the symbol "F." Since the symbol "G" is not registered, the symbol conversion unit 111 outputs the symbol "G" and a Cmark bit of "0" while performing push processing on the symbol "G." In this case, the mask generation unit 113 generates and outputs a data mask of all "1s." Based on the data mask, the serializer 12 outputs serial data consisting of "0G," which is a Cmark bit of "0" followed by the symbol "G" (ASCII code: 01000110).

[0244] Figure 26 Figure B shows the processing of the symbol "E" following the symbol "G." Since the symbol "E" is not registered, the symbol conversion unit 111 outputs the symbol "E" and the Cmark bit "0" while performing push processing on the symbol "E." In this case, the mask generation unit 113 generates and outputs a data mask of all "1s." Based on the data mask, the serializer 12 outputs serial data consisting of "0E" (ASCII code: 01000101), which is the Cmark bit "0" followed by the symbol "E."

[0245] Figure 26 C shows the processing of the original symbol "F" input after the symbol "E". The symbol "F" has been registered at index "2" ( Figure 26 B). Therefore, the symbol conversion unit 111 outputs the bit value "10" indicating the index value "2" and the Cmark value "1". Furthermore, the symbol "F" is moved to the index "0" and the symbols "E" and "G" are moved to the next entry (the symbols "B", "A", "D", and "C" remain unchanged).

[0246] In this case, the entropy calculation unit 112 outputs the entropy calculation result "3," and the mask generation unit 113 generates and outputs the data mask "00000111." Since the Cmark bit is "1," the serializer 12 outputs the bits "010" representing the number of significant bits (=3) indicated by the data mask as the compression code. Consequently, the serializer 12 outputs the four-bit serial data "1010," consisting of the Cmark bit "1" followed by the compression code "010."

[0247] Figure 27Figure A shows the processing of the original symbol "H" input after the symbol "F." Since the symbol "H" is not registered, the symbol conversion unit 111 outputs the symbol "H" and a Cmark bit of "0" while performing a push process on the symbol "H." In this case, the mask generation unit 113 generates and outputs a data mask of all "1s." Based on the data mask, the serializer 12 outputs serial data consisting of "0H" (ASCII code: 01001000) followed by a Cmark bit of "0" followed by the symbol "H."

[0248] Figure 27 B shows the processing of the symbol "J" following the symbol "H." Since the symbol "J" is not registered, the symbol conversion unit 111 outputs the symbol "J" and the Cmark bit "0" while performing a push process on the symbol "J." At this time, the symbol "C" is squeezed out of the conversion table and deleted. The mask generation unit 113 generates and outputs a data mask of all "1s." Based on the data mask, the serializer 12 outputs serial data consisting of "0J," which is the symbol "J" (ASCII code: 01001010) followed by the Cmark bit "0."

[0249] Figure 27 C shows the processing of the symbol "A" following the symbol "J". The symbol "A" has been registered at index "6" ( Figure 27 B) Therefore, the symbol conversion unit 111 outputs the bit value "110" indicating the index value "6" and the Cmark value "1". In addition, the symbol "A" is moved to the index "0" and the symbols "J" to "B" are moved to the next entry.

[0250] In this case, entropy calculation unit 112 outputs the entropy calculation result "3," and mask generation unit 113 generates and outputs a data mask of "00000111." Since the Cmark bit is "1," serializer 12 outputs bit "110," which represents the number of significant bits (=3) indicated by the data mask, as a compression code. Consequently, serializer 12 outputs four bits of serial data "1110," consisting of the Cmark bit "1" followed by the compression code "110."

[0251] Figure 28 The processing of symbol "B" following symbol "A" is shown. Symbol "B" is already registered at index "6" ( Figure 27 C) Therefore, the symbol conversion unit 111 outputs the index value "6" (bit value "111") and the Cmark value "1". In addition, the symbol "B" is moved to the index "0" and the symbols "A" to "G" are moved to the next entry.

[0252] In this case, entropy calculation unit 112 outputs the entropy calculation result "3," and mask generation unit 113 generates and outputs the data mask "00000111." Because the Cmark bit is "1," serializer 12 outputs bit "110," which represents the number of significant bits (=3) indicated by the data mask, as the compression code. Consequently, serializer 12 outputs four bits of serial data "1110," consisting of the Cmark bit "1" followed by the compression code "110."

[0253] Furthermore, in the output of the compression device 10 described above, the output of the serializer 12 corresponding to the original symbol string "ABACDABFGEFHJAB" (15×8=120 bits) is 101 bits, and the compression rate is 84%.

[0254] <<Decompression Method>>

[0255] Figure 29 A~C, Figure 30 A~C, Figure 31 A~C, Figure 32 A~C, Figure 33 A~C, Figure 34 FIG is an explanatory diagram of an operation example (compression method) of the decompression device 50. Figure 29 A shows a conversion table of an example of the operation of the decompression device 50. Figure 23 The conversion table shown in A has the same data structure as the compression device 10. Therefore, repeated description will be omitted.

[0256] As an example, the input to the decompression device 10 is the serial data (Cmark bit + compression symbol) bit stream, "0A", "0B", "11", "0C", "0D", "110", "111", "0F", "0G", "0E", "1010", "0H", "0J", "1110", "1110" output from the compression device 10 in the working example of the compression device 10.

[0257] Furthermore, it is assumed that all entries in the initial conversion table in the decompressor 52 are in an unregistered state. In the following working example, the conversion table is updated using the first operation method of the conversion table. The conversion table update process is performed by the decompressor 52 (symbol conversion unit 521). The entropy calculation unit 522 calculates entropy using the first calculation method.

[0258] Figure 29 B shows a process when serial data “0A” is input to the decompression device 50 . The deserializer 51 separates the serial data “0A” into a Cmark bit “0” and a compression code “A” and inputs the resultant data to the decompressor 52 .

[0259] Since the Cmark bit is "0," the symbol conversion unit 521 outputs the compressed symbol "A" as the original symbol (decompressed symbol). The entropy calculation unit 522 outputs 0 as the entropy calculation result, and the data mask generation unit 523 generates and outputs a data mask "11111111" indicating that all bits are valid, regardless of the entropy calculation value.

[0260] Figure 29 C shows the process when serial data "0B" is input to decompression device 50. Deserializer 51 separates serial data "0B" into a Cmark bit "0" and a compressed code "B," and inputs these to decompressor 52. Since the Cmark bit is "0," code conversion unit 521 outputs the compressed code "B" as the original code. At this point, a data mask "11111111" is generated and output.

[0261] Figure 30 Figure A shows the process when serial data "11" is input to the decompression device 50. The deserializer 51 refers to the first "1" of the serial data "11" and determines that it is the Cmark bit "1." In this case, the decompressor 52 reads one bit based on the data mask "00000001" and outputs it as compressed data. This separates the Cmark bit "1" and the compression code "1" and inputs each bit to the decompressor 52.

[0262] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "A" ( Figure 29 C) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves symbol "A" to index "0" and symbol "B" to the next entry (index "1"). The entropy calculation unit 522 outputs "1" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000001" and provides it to the deserializer 51.

[0263] Figure 30 B shows the process when serial data "0C" is input to decompression device 50. Deserializer 51 determines that the Cmark bit is "0" and outputs N bits. This outputs the compressed code "C". Deserializer 51 provides the Cmark bit "0" and the compressed code "C" to decompressor 52.

[0264] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "C" as the original symbol and performs push processing on the conversion table to register the symbol "C" at index "0". In this case, the data mask "11111111" is generated and output.

[0265] Figure 30 C shows the process when serial data "0D" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compressed symbol "D" by outputting N bits. The deserializer 51 provides the Cmark bit "0" and the compressed symbol "D" to the decompressor 52.

[0266] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "D" as the original symbol and performs push processing on the conversion table to register the symbol "D" at index "0". In this case, the data mask "11111111" is generated and output.

[0267] Figure 31 Figure A shows the process when serial data "110" is input to decompression device 50. Deserializer 51 refers to the first "1" of serial data "110" and determines that the Cmark bit is "1." In this case, it reads two bits based on the data mask "00000011" from decompressor 52 and outputs the bit value "10" as compressed data. Thus, the Cmark bit "1" and the compression code "10" are input to decompressor 52.

[0268] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "A" registered at the index "2" represented by the compression symbol "10" ( Figure 30 C) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves the symbol "A" to index "0" and moves the symbols "D" and "C" to the next entry. The entropy calculation unit 522 outputs "2" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000011" and provides it to the deserializer 51.

[0269] Figure 31 Figure B shows the process when serial data "111" is input to decompression device 50. Deserializer 51 refers to the first "1" of serial data "111" and determines that the Cmark bit is "1." In this case, it reads two bits based on the data mask "00000011" from decompressor 52 and outputs the bit value "11" as compressed data. Thus, the Cmark bit "1" and the compression code "11" are input to decompressor 52.

[0270] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "B" registered at the index "3" represented by the compression symbol "11" ( Figure 31A) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves the symbol "B" to index "0" and moves the symbols "A," "D," and "C" to the next entry. The entropy calculation unit 522 outputs "2" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000011" and provides it to the deserializer 51.

[0271] Figure 31 C shows the process when serial data "0F" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compression symbol "F" based on the output of N bits. The deserializer 51 provides the Cmark bit "0" and the compression symbol "F" to the decompressor 52.

[0272] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "F" as the original symbol and performs push processing on the conversion table to register the symbol "F" at index "0". In this case, the data mask "11111111" is generated and output.

[0273] Figure 32 A shows the process when serial data "0G" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compression code "G" based on the output of the N bit. The deserializer 51 provides the Cmark bit "0" and the compression code "G" to the decompressor 52.

[0274] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "G" as the original symbol and performs push processing on the conversion table to register the symbol "G" at index "0". In this case, the data mask "11111111" is generated and output.

[0275] Figure 32 B shows the process when serial data "0E" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compression symbol "E" based on the output of the N bit. The deserializer 51 provides the Cmark bit "0" and the compression symbol "E" to the decompressor 52.

[0276] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "E" as the original symbol and performs push processing on the conversion table to register the symbol "E" at index "0". In this case, the data mask "11111111" is generated and output.

[0277] Figure 32C shows the process when serial data "1010" is input to decompression device 50. Deserializer 51 refers to the first "1" of serial data "1010" and determines that the Cmark bit is "1." In this case, it reads three bits based on the data mask "00000111" from decompressor 52 and outputs the bit value "010" as compressed data. Thus, the Cmark bit "1" and the compression code "010" are input to decompressor 52.

[0278] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "F" registered at the index "2" represented by the compression symbol "010" ( Figure 32 B) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves the symbol "F" to index "0" and moves the symbols "E" and "G" to the next entry. The entropy calculation unit 522 outputs "3" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000111" and provides it to the deserializer 51.

[0279] Figure 33 A shows the process when serial data "0H" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compression code "H" based on the output of the N bit. The deserializer 51 provides the Cmark bit "0" and the compression code "H" to the decompressor 52.

[0280] Since the Cmark bit is "0", the symbol conversion unit 521 outputs the compressed symbol "H" as the original symbol and performs push processing on the conversion table to register the symbol "H" at index "0". In this case, the data mask "11111111" is generated and output.

[0281] Figure 33 B shows the process when serial data "0J" is input to the decompression device 50. Since the Cmark bit is "0", the deserializer 51 outputs the compression symbol "J" based on the output of the N bit. The deserializer 51 provides the Cmark bit "0" and the compression symbol "J" to the decompressor 52.

[0282] Since the Cmark bit is "0," the symbol conversion unit 521 outputs the compressed symbol "J" as the original symbol and simultaneously pushes the conversion table, registering the symbol "J" at index "0." At this point, the symbol "C" is pushed out of the conversion table and deleted. The entropy calculation unit 522 outputs "3" as the entropy calculation result, and the mask generation unit 523 provides the data mask "00000111" to the deserializer 51.

[0283] Figure 33C shows the process when serial data "1110" is input to decompression device 50. Deserializer 51 refers to the first "1" of serial data "1110" and determines that the Cmark bit is "1." In this case, it reads three bits based on the data mask "00000111" from decompressor 52 and outputs the bit value "110" as compressed data. Thus, the Cmark bit "1" and the compression code "110" are input to decompressor 52.

[0284] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "A" registered at the index "6" represented by the compression symbol "110" ( Figure 33 B) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves the symbol "A" to index "0" and moves the symbols "J" to "B" to the next entry. The entropy calculation unit 522 outputs "3" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000111" and provides it to the deserializer 51.

[0285] Figure 34 The following figure illustrates the process when serial data "1110" is input to the decompression device 50. The deserializer 51 refers to the first "1" of the serial data "1110" and determines that the Cmark bit is "1." In this case, the decompressor 52 reads three bits based on the data mask "00000111" and outputs the bit value "110" as compressed data. Thus, the Cmark bit "1" and the compression code "110" are input to the decompressor 52.

[0286] Since the Cmark bit is "1", the symbol conversion unit 521 reads the symbol "B" registered at the index "6" represented by the compression symbol "110" ( Figure 33 C) and outputs it as the original symbol. Furthermore, the symbol conversion unit 521 moves the symbol "A" to index "0" and moves the symbols "A" through "G" to the next entry. The entropy calculation unit 522 outputs "3" as the entropy calculation result, and the mask generation unit 523 generates a data mask "00000111" and provides it to the deserializer 51.

[0287] According to the above decompression method, the conversion table provided by the compressor 11 is reproduced in the decompressor 52, and the original symbols can be decompressed (restored) using the conversion table. In this case, the compressed symbol length can be changed depending on the usage of the conversion table. Therefore, the compression ratio can be improved depending on the usage of the table (multiple entries). Furthermore, the amount of data flowing through the transmission path between the compression device 10 and the decompression device 50 can be reduced.

[0288] [Implementation Method 2]

[0289] Next, the compression device and the decompression device of Embodiment 2 will be described. Embodiment 2 includes the same structure as Embodiment 1, so the description of the same structure will be omitted and the differences will be mainly described.

[0290] In the first embodiment, as the number of original symbols increases, the conversion table becomes full. In this case, the data mask becomes M bits. Even if the original symbol hits the conversion table, the compressed symbol will still be M bits, making it impossible to perform entropy control locally. Therefore, in the second embodiment, the symbols in the last (largest index) entry in the used entries are cleared based on the number of symbol hits or misses, thereby reducing entropy (also known as entropy culling).

[0291] Figure 35 An example of entropy elimination in the second embodiment is shown. Figure 35 As shown in the upper left of the figure, assume that symbols "A" through "E" are registered at indexes "0" through "4" in the conversion table of the compression device. In this case, if the symbol "D" (8 bits) is input as the original symbol, index "3" (bit value: 011) is hit. In this case, the entropy calculation result using the first calculation method is 3, and the data mask based on this becomes "00000111". Therefore, the output from the compression device, namely the serial data of the Cmark bits and the compressed symbol, becomes "1011".

[0292] Based on the hit of symbol "D", symbol "D" moves to index "0" according to the first operation method, and symbols "A", "B", and "C" move to the next entry (refer to the conversion table in the upper right of the figure).

[0293] Next, assume that the input symbol "C" is the original symbol. In this case, index "3" is hit again. The entropy value and data mask are unchanged, so the serial data "1011" is output.

[0294] Based on the hit of symbol "C", symbol "C" is moved to index "0" according to the first operation method, and symbols "D", "A", and "B" are moved to the next entry (refer to the conversion table in the lower left of the figure). In addition, the two hits serve as a trigger to delete (clear) symbol "E" in the entry with the largest index value among the entries currently in use.

[0295] Next, if symbol "B" is input as the original symbol, index "4" will be hit. Here, due to the deletion of symbol "E," the entropy calculation result becomes 2, and the data mask becomes "00000011." Therefore, the compression device outputs serial data "111," consisting of the Cmark bit "1" and the compressed symbol "11."

[0296] Then, based on the hit of symbol "B," symbol "B" is moved to index "0" according to the first operation method, and symbols "C," "D," and "A" are moved to the next entry (see the conversion table in the lower right corner of the figure). Then, if symbol "C" is input as the original symbol, index "1" is hit. The entropy calculation result at this point is 2, and the data mask becomes "00000011." Therefore, the compression device outputs serial data "101," consisting of the Cmark bit "1" and the compressed symbol "01."

[0297] In the decompression device, the two hits are also used as an opportunity to clear the symbol in the entry with the largest index value among the entries in use. Therefore, the conversion table in the decompression device is also performed as follows Figure 35 Except for the above points, the structures of the compression device and the decompression device are the same as those in the first embodiment.

[0298] In addition, a rule can be established that the symbols registered in the entries from the beginning to the specified position (within the specified range) will not be deleted due to culling. This can prevent the situation where the registered symbols are deleted too much due to culling. For example, Figure 35 The conversion table shown may be configured so that even if the symbols registered in the entries at indexes "0" and "1" satisfy the elimination conditions, they are not eliminated. The predetermined position can be set as appropriate.

[0299] Furthermore, in the above example, culling is performed based on the second hit, but culling can also be triggered by a predetermined number of misses. Hits and misses can also be interspersed between the hits and misses counted (the number of hits or misses does not need to be continuous).

[0300] According to the second embodiment, entropy culling can be used to control local entropy and reduce the size of the compressed symbols.

[0301] [Implementation Method 3]

[0302] Next, the compression device and the decompression device of Embodiment 3 will be described. Embodiment 3 includes the same structure as Embodiment 1, so the description of the same structure will be omitted and the differences will be mainly described.

[0303] As shown in the second problem of the reference example, in the reference example, the end of the compressed symbol string cannot be identified on the decompression side. Therefore, the entries from the beginning of the conversion table to the specified position are reserved (reserved) by exception symbols. The exception symbol is a symbol assigned with a specified command (instruction), and on the decompression side, the control-related command represented by the exception symbol is identified. The exception symbol logged in the reserved entry will not be the object of overwriting or deletion. On the compression side, it is also possible to output the exception symbol by bypassing (bypassing) the conversion processing using the conversion table. In addition, in the output from the compression device, the actual parameter (argument) attached to the instruction can be connected after the exception symbol with the Cmark bit "0" and an N-bit width. It is set so that the number of the actual parameters is grasped on the decompression side (decompression device).

[0304] <Command Send>

[0305] Figure 37 A to C are diagrams explaining exception symbols. Figure 37 An example of a conversion table shared by the compression device and the decompression device is shown in A. The conversion table has a predetermined number (four, for example) of entries (indexes "0" to "3"), with index "0" being reserved for registering an exception symbol indicating instruction 1, and index "1" being reserved for registering an exception symbol indicating instruction 2.

[0306] Figure 37 B shows an example of a method for sending instruction 1 (first sending method). When sending instruction 1 from the compression side to the decompression side, the compression device sends the Cmark bit "1" and the index "0" as the compression symbol to the decompression side. The decompression device reads the exception symbol of instruction 1 from the index "0" based on the Cmark bit "1" and identifies instruction 1 to perform processing corresponding to instruction 1. However, when using the first sending method, it is necessary to ensure that the bit stream (symbol) for the instruction does not appear as the original symbol. Alternatively, it is necessary to retain the entry with the instruction logged in so that it cannot be used as the login for the original symbol.

[0307] Figure 37 C shows another method for sending instruction 1 (second sending method). When sending instruction 1 to the decompression device, the compression device sends the Cmark bit "0" and the exception symbol of instruction 1 as the compression symbol to the decompression device. In the decompression device, the exception symbol of instruction 1 is to be registered in the conversion table based on the Cmark bit "0", but since the exception symbol of instruction 1 has already been registered, an error (exception) occurs (see Figure 22 , S38, S41). The decompression device executes instruction 1 as an exceptional instruction in the exceptional processing for this exception.

[0308] Figure 38 A to C show methods of sending instructions from the compression device to the decompression device without reserving entries. Figure 38 A shows an example of a conversion table. The conversion table has a predetermined number of entries (four, for example), with two symbols, "AB" and "CD," registered at indexes "0" and "1," respectively. The symbols "AB" and "CD" are not exception symbols but rather common, primitive symbols. The number of symbols shown is merely an example; the number can be one or three or more.

[0309] Figure 38 B shows the third method of sending instructions. Figure 38 In the case of the conversion table of the login content shown in A, the Cmark bit is "1" and the index of the empty entry (index "2" or "3") as the compression symbol is sent. The decompression device attempts to read the symbol from index "2" or "3" according to the Cmark bit "1", but since it is an empty entry, it cannot be read and an error occurs (see Figure 22 , S33, S42). The decompression device regards the occurrence of the error as the occurrence of an exception (instruction execution). At this time, if the index is "2", it can be interpreted as instruction 1, and if the index is "3", it can be interpreted as instruction 2.

[0310] Figure 38 C shows the fourth method of sending instructions. Figure 38 In the case of the conversion table with the registered content shown in A, the Cmark bit is "0" and the symbol "AB" or "CD" is sent as the compression symbol. The decompression device attempts to register the symbol "AB" or "CD" based on the Cmark bit being "0", but since the symbols "AB" and "CD" have already been registered, an error occurs. The decompression device treats this error as an exception (instruction execution). In this case, if the symbol is "AB", it can be interpreted as the execution of instruction 1, and if the symbol is "CD", it can be interpreted as the execution of instruction 2.

[0311] When executing the first to fourth transmission methods, the code conversion unit 111 may generate and transmit a combination of a Cmark bit and a compression code corresponding to the command without performing normal processing related to the conversion table.

[0312] Figure 39This table summarizes the first through fourth transmission methods. The first and second transmission methods described above belong to the type (Type 1) that reserves entries for registering exception symbols as instructions. In contrast, the third and fourth transmission methods belong to the type (Type 2) that does not reserve entries for instructions (exceptional symbols). Types 1 and 2 are categorized as sending entry indexes to the decompression side (Type 3) and sending the original symbols to the decompression side (Type 4), respectively.

[0313] The first transmission method is a combination of Type 1 and Type 3. As described above, the compression device transmits the index of the reserved entry and the Cmark bit set to "1" to the decompression device. The decompression device retrieves the symbol registered in the entry specified by the index and executes the instruction. This first transmission method is called RETI (Reserve Entry, Transmit Index).

[0314] The second transmission method is a combination of Type 1 and Type 4. As described above, the compression device sends the original symbol (command) registered in the reserved entry with the Cmark bit set to "0" to the decompression device. In the decompression device, the original symbol (command) is already registered, so an error (exception) occurs. As an exception to this exception, the decompression device executes the command. This second transmission method is called RETO (Reserve Entry, Transmit Original).

[0315] The third transmission method is a combination of Type 2 and Type 3. As described above, the compression device sends the index of an unused entry and the Cmark bit set to "1" to the decompression device. In the decompression device, the entry indicated by the index is unused, resulting in an error (exception). As an exception to this exception, the decompression device executes the instruction. The third transmission method is called FETI (Free Entry, Transmit Index).

[0316] The fourth transmission method is a combination of Type 2 and Type 4. As described above, the compression device sends the original symbol (instruction) registered in the reserved entry and the Cmark bit "0" to the decompression device. In the decompression device, the original symbol is already registered, so an error (exception) occurs. As an exception handling for this exception, the decompression device executes the instruction. The fourth transmission method is called FETO (Free Entry, Transmit Original). In the third and fourth transmission methods, the instruction sent from the compression device can be used, or the decompression device can obtain the instruction held locally (locally) when the exception occurs and execute it. The path for obtaining the instruction is not mentioned.

[0317] The advantage of type 1 is that it does not require the retrieval of all entries. In contrast, the disadvantage of type 1 is that it generates entries that cannot be used for compression and requires the pre-defined entries for instruction login. The advantage of type 2 is that although all entries need to be retrieved, all entries can be used for compression. The disadvantage of type 2 is that the third sending method (FETI) and the fourth sending method (FETO) are used separately when the conversion table is full and when there are empty entries. Specifically, FETO is executed when the conversion table is full. FETI is executed when there are empty entries in the conversion table. Otherwise, FETO is executed.

[0318] Figure 40 This is a timing diagram showing an example of instruction transmission. During the compression process of the compression device 10 for the original symbol string, if an exception is input, the compression process for the original symbol is stopped and the specified exception processing is performed. As an exception processing, the decompression device 50 performs a process of inserting instruction execution data into the compressed symbol string. The instruction execution data includes, for example, an exception symbol (in Figure 37 B and C, Figure 38 B and C), the indexes and symbols shown in FIG, and the instructions to be executed by the decompression device 50. Furthermore, the instruction execution data may include one or more actual parameters related to the instruction execution. Figure 40 In the example, two actual parameters are inserted after the instruction. If the exception handling ends, the compression process for the original symbol is restarted.

[0319] In the decompression device 50, if an exception symbol is detected during the decompression process of a compressed symbol, an exception is generated and the instruction is executed as an exception. During the execution of the instruction, the decompression process of the compressed symbol is stopped and the exception symbol, instruction, and actual parameter are not output as the decompression result.

[0320] <Working Example>

[0321] <<Processing in Compression Device>>

[0322] Figure 41 A~C, Figure 42 A~C, Figure 43 A~C, Figure 44 A~C, Figure 45 A~C, Figure 46 A and B are diagrams for explaining an example of operation (compression method) of the compression device 10 in the third embodiment. In this example, 8-bit original symbols are processed. The size of the conversion table is 8 entries (index "0" to "7") (refer to Figure 41A) For exceptional symbols, FETI (third transmission method) or FETO (fourth transmission method) is used.

[0323] As instructions based on exception symbols, in this working example, the RES (Reset Table) instruction and the EOS (End of Stream) instruction are used. The RES instruction is an instruction for resetting the login content of the conversion table. The RES instruction is denoted as "RET". The RES instruction is represented by the symbol "E". The EOS instruction is a symbol representing the tail end of the compressed symbol string, denoted as "EOS". The EOS instruction is represented by the symbol "F". The following description shows an example of the execution of instructions by the symbol conversion unit 111, 521, but the instructions can also be executed by components other than the symbol conversion unit 111, 521. For example, an instruction execution unit that executes instructions can also be set.

[0324] Assume that "ABAC(RET)BACAGFHJK(EOS)" is input to the compression device 10 as the original symbol string. Figure 41 B shows the processing of the first symbol "A" of the original symbol string. Figure 41 C shows the processing of the symbol "B" following the symbol "A." The processing of the symbols "A" and "B" is the same as that in the first embodiment, and therefore the description thereof is omitted.

[0325] Figure 42 A shows the processing of the symbol "A" following the symbol "B", Figure 42 B shows the processing of the symbol “C” following the symbol “A.” The processing of the symbols “A” and “C” is the same as that in the first embodiment, and therefore the description thereof is omitted.

[0326] Figure 42 C shows the processing when the exception instruction "RET" is input. If "RET" is input, the symbol conversion unit 111 of the compressor 11 of the compression device 10 responds using FETO (the fourth sending method). In this working example, index "0" is used as an example of a logged-in entry, and the symbol "C" logged in at index "0" is output as a compression symbol. The symbol conversion unit 111 sets the value of the Cmark bit for the symbol "C" to "0". As a result, a contradiction regarding the symbol "C" occurs in the decompression device 50, which triggers the occurrence of an exception. Subsequently, the symbol conversion unit 111 outputs the instruction symbol "E" meaning the RES instruction. In addition, the entry used for FETO can also be an entry other than index "0", as long as it is logged in.

[0327] Figure 43A shows the case where an exception (RES instruction) is executed in response to "RET." The compressor 11 (symbol converter 111) executes the RES instruction to reset the conversion table (clear all registered symbols) and initialize the conversion table. The RES instruction can be used to reset the entropy history for different data streams.

[0328] Figure 43 B shows the processing of the original symbol "B", Figure 43 C shows the processing of the original symbol "A" following the symbol "B." These processes are the same as those in the first embodiment, and therefore their description is omitted.

[0329] Figure 44 A shows the processing of the original symbol "C", Figure 44 B shows the processing of the original symbol "A" after the symbol "C", Figure 44 C shows the processing of the original symbol "G" following the symbol "A." These processes are the same as those in the first embodiment, and therefore, description thereof will be omitted.

[0330] Figure 45 A shows the processing of the original symbol "F", Figure 45 B shows the processing of the original symbol "H" after the symbol "F", Figure 45 C shows the processing of the original symbol "J" following the symbol "H." These processes are the same as those in the first embodiment, and therefore, description thereof will be omitted.

[0331] Figure 46 A shows the processing of the original symbol "K" following the symbol "J". These processes are the same as those in the first embodiment, so the description thereof will be omitted. Figure 46 B shows the processing when the exception instruction "EOS" is input. If "EOS" is input, the symbol conversion unit 111 of the compressor 11 of the compression device 10 will output the symbol "K" logged at index "0" as a compression symbol as a response based on FETO (the fourth transmission method). The symbol conversion unit 111 sets the value of the Cmark bit for the symbol "K" to "0". As a result, a contradiction regarding the symbol "K" occurs in the decompression device 50, which triggers the occurrence of an exception. Subsequently, the symbol conversion unit 111 outputs the instruction symbol "F" which means the EOS instruction. Then, in the compression device 10, the tail end of the original symbol string is identified by the exception instruction "EOS", and the prescribed processing is performed (the compression processing may also be ended).

[0332] <<Processing in Decompression Device>>

[0333] Figure 47 A~C, Figure 48 A~C, Figure 49 A~C, Figure 50A~C, Figure 51 A~C, Figure 52 A and B are diagrams for explaining an example of an operation example (decompression method) of the decompression device 50 in the third embodiment. Figure 47 Reference numeral A shows the conversion table included in decompressor 52 of decompression device 50, which has the same structure as the conversion table included in compression device 10. This working example describes the case where "AB1CCEBAC1GFHJKKF" is input as compressed symbols to decompression device 50. Each symbol is preceded by a Cmark bit, which is combined with the Cmark bit to form serial data. This is the same as in the first embodiment.

[0334] Figure 47 B shows the processing of serial data "0A." In the third embodiment, deserializer 51 also separates serial data "0A" into Cmark bit "0" and compressed symbol "A," and inputs these to decompressor 52. Decompressor 52 outputs compressed symbol "A" as the original symbol based on the Cmark bit "0." This is the same processing as in the first embodiment.

[0335] However, in the third embodiment, when registering a symbol in the conversion table, the symbol conversion unit 521 registers the symbol after confirming that the symbol to be registered is not registered in all entries. Here, the symbol conversion unit 521 registers the symbol "A" after confirming that the symbol "A" is not registered.

[0336] Figure 47 C shows the processing of the serial data “0B” following the serial data “0A”. Figure 48 A shows the processing of the serial data “11” following the serial data “0B”. Figure 48 B shows the processing of the serial data "0C" following the serial data "11". These processes are the same as those in the first embodiment, so the description thereof is omitted.

[0337] Figure 48 C shows the processing of serial data "0C". The symbol conversion unit 521 wants to log the symbol "C" into the conversion table according to the Cmark bit "0". However, the symbol "C" has already been logged into the conversion table. Therefore, a contradiction (error) occurs. Therefore, the symbol conversion unit 521 refers to the next input compression symbol, and if the value of the symbol is the symbol "E", the instruction "RET" is executed to clear all entries in the conversion table. Thus, the table is reset (refer to Figure 49 A) The symbol conversion unit 521 does not output the original symbols (decompression symbols) corresponding to the symbols "C" and "E" because the symbol "C" is a symbol for generating a conflict and the symbol "E" is an instruction symbol.

[0338] Figure 49B shows the processing for serial data "0B" input after the table is reset. Figure 49 C shows the processing of the serial data “0A” following the serial data “0B”. Figure 50 A shows the processing of the serial data “0C” following the serial data “0A”. Figure 50 B shows the processing of the serial data “11” following the serial data “0C”. Figure 50 C shows the processing of the serial data "0G" following the serial data "11". These processes are the same as those in the first embodiment, and therefore the description thereof is omitted.

[0339] Figure 51 A shows the processing of serial data “0F” following serial data “0G”. Figure 51 B shows the processing of the serial data “0H” following the serial data “0F”. Figure 51 C shows the processing of the serial data “0J” following the serial data “0H”. Figure 52 A shows the processing of the serial data “0K” following the serial data “0J”. These processes are the same as those in the first embodiment, so the description thereof will be omitted.

[0340] Figure 52 B shows the processing of the serial data "OK" following the serial data "OK." The symbol conversion unit 521 attempts to register the symbol "K" in the conversion table based on the Cmark bit being "0." However, the symbol "K" is already registered in the conversion table, creating a conflict. The symbol conversion unit 521 then references the next compression symbol. If the next compression symbol is "F," the symbol conversion unit executes the "EOS" instruction to identify (detect) the end of the original symbol string. Simultaneously, the specified processing (such as the end of the decompression process) is performed.

[0341] According to the third embodiment, a command can be sent from the compression device 10 to the decompression device 50 to perform table reset, identify the end position of the original symbol string, etc. The contents of the command are examples, and commands other than RET and EOS can also be sent.

[0342] [Implementation Method 4]

[0343] Next, a compression device and a decompression device according to Embodiment 4 will be described. Embodiment 4 includes the same configuration as Embodiments 1 and 3, so description of the same configuration will be omitted and the differences will be mainly described.

[0344] The fourth embodiment shows a method of retaining an entry for registering an instruction symbol in the conversion table described in the third embodiment. Figure 53 A~C, Figure 54 A~C, Figure 55 A~C, Figure 56 A~C, Figure 57 A~C, Figure 58 The following is an example of the operation (compression method) of the compression device 10 in the fourth embodiment. Figure 53 As shown in Figure 4, in the fourth embodiment, indexes "0" and "1" are reserved in the conversion tables of the compression device 10 and the decompression device 50, and the symbols "C" and "F" for the instructions are pre-registered. Entries that can register the original symbols are indexes "2" to "7" starting with index "2".

[0345] Since the symbols are registered at indexes "0" and "1", the initial value of the entropy calculation value in the fourth embodiment is "1". The other conditions are the same as those in the third embodiment, and the strings of the original symbols and exception symbols (instructions) are also the same as those in the third embodiment.

[0346] Figure 53 B shows the processing of the original symbol "A". Since symbol "A" is not registered, the symbol conversion unit 111 registers symbol "A" at index "2" and outputs the compressed symbol "A" with the Cmark bit set to "0". The entropy calculation value becomes 2. The data mask is all 1. Figure 53 B shows the processing of the original symbol "B." In this case, symbol "B" is registered at index "2," and symbol "A" is moved below to index "3." The output is a Cmark bit "0" and a compressed symbol "B." The entropy calculation value is 2, and the data mask is all 1.

[0347] Figure 54 A shows the processing of the original symbol "A". The symbol "A" has been registered at index "3" ( Figure 53 C), so the Cmark bit is output as "1" and the index value is "3". The entropy calculation value at this time is 2, and the data mask becomes "00000011" indicating a valid number of 2.

[0348] Figure 54 B shows the processing of the original symbol "C." Symbol C is already registered at index "0," so the Cmark bit is set to "1" and the index value is "0." Thus, for the original symbol "C," the index "0," which was reserved for registering the instruction symbol "C," is used to compress the original symbol "C." In this case, the entropy calculation value is 2, and the data mask is "00000011."

[0349] Figure 54C shows the processing when the instruction symbol "RET" is input. When the instruction symbol "RET" is input, the symbol conversion unit 111 uses RETO (the fourth transmission method) to output the instruction symbol "C" registered at the predetermined index "0" of RET as a compressed symbol. It also outputs the Cmark bit "0" to cause a conflict in the decompression device 50. As a result, the data mask is all 1. In response to the instruction "RET," the symbol conversion unit 111 clears the registered symbols from entries with indexes "2" and later.

[0350] Figure 55 A shows the processing of the original symbol "B", Figure 55 B shows the processing of the original symbol "A", Figure 55 C shows the processing of the original symbol "C". Figure 56 A shows the processing of the original symbol "A", Figure 56 B shows the processing of the original symbol "G". Similar to the third embodiment, these processes are performed according to the first operation method. Detailed description is omitted.

[0351] Figure 56 C shows the processing of the original symbol "F." Symbol "F" is registered as an instruction symbol at index "1." This entry is used to compress the original symbol "F." The symbol conversion unit 111 outputs a Cmark bit of "1" and an index value of "1." The calculated entropy value at this point is 3, and the output data mask is "00000111."

[0352] Figure 57 A shows the processing of the original symbol "H", Figure 57 B shows the processing of the original symbol "J", Figure 57 C shows the processing of the original symbol "K". Similar to the third embodiment, these processes are performed according to the first operation method. Detailed description is omitted.

[0353] Figure 58 The following figure shows the processing when the command symbol "EOS" is input. When the command symbol "EOS" is input, the symbol conversion unit 111 uses RETO (the fourth transmission method) to output the command symbol "F" with the EOS registered at the predetermined index "1" as the compression symbol. It also outputs the Cmark bit "0" to cause a conflict in the decompression device 50. As a result, the data mask is all 1. In the compressor 11 (compression device 10), the command "EOS" identifies the end of the original symbol string and performs the specified processing.

[0354] Figure 59 A~C, Figure 60 A~C, Figure 61 A~C, Figure 62 A~C, Figure 63 A~C, Figure 64 The following is an example of the operation (decompression method) of the decompression device 50 in the fourth embodiment. Figure 59 As shown in A, similar to the compression device 10, the indexes "0" and "1" of the conversion table of the decompressor 52 are reserved, and the symbols "C" and "F" are registered (stored). Therefore, the initial value of the entropy calculation value is 1.

[0355] The serial data stream output from compression device 10 is input as transmission data to decompression device 50. The serial data stream is a collection of serial data with a Cmark bit added before each compression symbol "AB30CBA02G1HJKF." The following describes the processing in decompression device 50 in comparison with the third embodiment.

[0356] Figure 59 B shows the processing of serial data "0A". In the decompression device 50, the deserializer 51 separates the serial data "0A" into the Cmark bit "0" and the compression symbol "A" and provides them to the decompressor 52. The operation of the deserializer 51 is the same as that of the third embodiment. In the decompressor 52, the symbol conversion unit 521 performs the same processing as that of the third embodiment ( Figure 22 ). However, indexes "0" and "1" are retained, and therefore, the same as the third embodiment except that the entry for logging the compression symbol starts from index "2" and the calculated value of entropy changes accordingly.

[0357] Figure 59 C shows the processing for serial data "0B". Figure 60 A shows the processing for serial data "111". Figure 60 B shows the processing for the serial data "100." These are the same as those in the third embodiment except for the above-mentioned registration position and entropy calculation value, and therefore the description thereof is omitted.

[0358] Figure 60 C shows the processing of serial data "0C." The Cmark bit "0" and the symbol "C" (the symbol of the instruction "RET") output as a compression symbol by the RETO command in the compression device 10 are input to the decompressor 52. When the symbol conversion unit 521 references the conversion table based on the Cmark bit "0," the symbol "C" is already registered, resulting in an error. This error triggers the execution of the instruction "RET" assigned to the symbol "C," resetting the contents of the conversion table except for the reserved area.

[0359] Figure 61 A to C show the processing for the serial data "0B", "0A", and "100". Figure 62 A to C show the processing of the serial data "110", "0G", and "0F". Figure 63A to C show the processing for the serial data "0H", "0J", and "0K". These processes are substantially the same as the operations of the third embodiment, and therefore their description is omitted.

[0360] Figure 64 The following figure illustrates the processing of serial data "0F." The Cmark bit "0" and the compression symbol "F" (the symbol of the command "EOS") output by the compression device 10 via RETO are input to the decompressor 52. Based on the Cmark bit "0," the conversion table searches for the symbol "F." Since the symbol "F" is already registered, an error occurs. This error triggers the execution of the command "EOS," assigned the symbol "F," to identify the end of the original symbol string. Predetermined processing corresponding to the end identification may also be performed.

[0361] According to the fourth embodiment, similarly to the third embodiment, the decompression device 50 can be caused to execute a predetermined instruction (command).

[0362] [Implementation Method 5]

[0363] Next, the compression device and decompression device of Embodiment 5 will be described. The structure of Embodiment 5 is similar to that of Embodiment 1, so the differences will be mainly described, and the description of the similarities will be omitted.

[0364] In the first embodiment, when the entry in which the symbol of the search target is registered is hit, the symbol in the hit entry is moved to the entry with index "0", and the symbols registered in other entries are moved to the next entry by pushing ( Figure 16 A) In the first embodiment, regardless of the position (index) of the hit entry, the index is moved to "0". However, if this process is implemented in hardware (circuit), it may lead to a complicated circuit structure, an increase in circuit scale, and a decrease in operating frequency.

[0365] Therefore, in the fifth embodiment, in the table update ( Figure 15 S16, Figure 23 In S35), the symbol in the hit entry is moved to the entry k back from the index i (i is an integer greater than or equal to 0) of the hit entry. This reduces the number of symbols moved by pushing, thus reducing the circuit scale. However, if ik ≤ 0, the symbol is moved to the first entry in the original symbol's login field. If there is no reservation, the first entry has index "0". If there is a reservation, the first entry has an index equal to the number of reserved entries + 1.

[0366] Figure 65 A~C, Figure 66 A~C, Figure 67 A to C show operation examples of the compression device 10 according to the fifth embodiment. Figure 65 A shows the data structure of the conversion table included in the compression device 10 and decompression device 50 of the fifth embodiment. In this working example, as in the first embodiment, the original symbol size is 8 bits, and a conversion table with 8 entries (indexes "0" to "7") is used. Furthermore, in this working example, the first operation method is used for operation of the conversion table, and the first calculation method is used for calculation of entropy. Exception symbols are handled using RETI (the third transmission method).

[0367] However, unlike the first embodiment, when an entry hits, the symbol in the hit entry is moved to the entry (k=2) that is backtracked k times from its index i. The value of k can be set to an appropriate number other than 2. Furthermore, when an entry hits twice (when the number of hits (hit count = 2)), the entry elimination described in the second embodiment is performed.

[0368] like Figure 65 As shown in A, in this working example, index "0" is reserved, and instruction 1 is registered. The symbol of instruction 1 (the exception symbol) is different from the original symbol. In this working example, instruction 1 is instruction "EOS," but it can be any instruction other than EOS. Since index "0" is reserved, the entry for registering the original symbol begins with index "1."

[0369] Figure 65 B shows the processing of the original symbol "A". Figure 65 C shows the processing of the original symbol "B." These operations are identical to those in Embodiment 1, except that the registration position for symbol "A" is indexed "1" at the beginning of the original symbol's registration area. Therefore, detailed description is omitted. The method for creating the data mask is also identical to that in Embodiment 1.

[0370] Figure 66 A shows the processing of the original symbol "A". In this case, the index "2" of the registered symbol "A" hits. However, since ik = 2-2 = 0 (ik ≤ 0), the symbol "A" moves to the index "1" at the beginning of the registration area of ​​the original symbol (refer to Figure 66 In this case, the Cmark bit becomes "1", the compression code becomes "2", and the data mask becomes "00000011". In addition, the value of the hit count (hit count) becomes 1.

[0371] Figure 66 B and C show the processing for the original symbols "C" and "D." These processings are the same as the processing for the unregistered symbols in the first embodiment, and therefore their description is omitted.

[0372] Figure 67A shows the processing of the original symbol "B". Symbol "B" is logged in at index "4", so the Cmark bit "1" and the index value "4" are output from the compressor 11. At this time, the symbol "B" moves to the index "2" two back from the index "4" of the hit entry. At this time, the symbols "A" and "C" are pushed and moved to the next entry respectively. The replacement processing of these conversion tables is performed, for example, by the compressor 11 (symbol conversion unit 111), but can also be performed by components other than the symbol conversion unit 111. In this case, the entropy calculation value becomes 2, and the data mask becomes "00000011".

[0373] Furthermore, the hit count becomes 2. Therefore, the symbol "A" registered at index "4" of the last entry among the registered entries is deleted by entropy culling. This process can also be performed by the compressor 11 (symbol conversion unit 111) or a component other than the symbol conversion unit 111. Simultaneously with the culling, the hit count is reset (to 0).

[0374] Figure 67 Figure B shows the processing of the original symbol "C." Symbol "C" is already registered at index "3," so compressor 11 outputs the Cmark bit "1" and the index value "3." Symbol "C" is then moved back two indexes from index "3" of the hit entry to index "1." Symbols "D" and "B" are then pushed to the next entry, respectively. In this case, the entropy calculation value becomes 2, the data mask becomes "00000011," and the hit count becomes 1.

[0375] Figure 67 C shows the processing when the exception instruction "EOS" is input. In this case, RETI (first sending method) is performed. That is, the symbol representing "EOS" (instruction 1) has been logged in the reserved index "0", so the Cmark bit "1" and index "0" are output from the compressor 11. In the case of a hit instruction symbol, the movement of the hit symbol does not occur. Therefore, whether to add the hit to the hit count as a condition for the occurrence of culling is arbitrary and follows the instruction specification. In Figure 67 C shows an example where culling is performed based on the number of hits, deleting the trailing symbol "B." In this case, the entropy calculation value is 2, the data mask is "00000011," and the hit count is 0. If culling is not performed, the symbol "B" and the hit count value "1" remain unchanged.

[0376] Figure 68 A~C, Figure 69 A~C, Figure 70 A to C show operation examples of the decompression device 50 according to the fifth embodiment. Figure 68A shows the conversion table held by the decompressor 52. The data structure of the conversion table is the same as that of the conversion table held by the compressor 11. A serial data stream with a Cmark bit added to each symbol of the compressed symbol string "AB2CD430" obtained by converting the original symbol string is input to the decompressor 50.

[0377] Figure 68 B and C show the processing of serial data "0A" and "0B". In the decompression device 50, the deserializer 51 separates the serial data into the Cmark bit "0" and the compression symbol "A" and provides them to the decompressor 52. The operation of the deserializer 51 is the same as that of the third embodiment. In the decompressor 52, the symbol conversion unit 521 performs the same processing as that of the third embodiment ( Figure 22 ). However, index "0" is retained, and therefore, except that the entry for logging the compression symbol starts from index "1" and the calculated value of entropy changes accordingly, it is the same as the third embodiment.

[0378] Figure 69 Figure A shows the processing of serial data "110." Based on the Cmark bit being "1" and the compressed symbol "10," index "2" is a hit. In this case, symbol "A" registered at index "2" is moved to index "1" (since ik ≤ 0), and symbol "B" registered at index "1" is moved to index "2." Symbol "A" is output as the decompressed symbol. The entropy calculation value is 2, the data mask is "00000011," and the bit count is 1.

[0379] Figure 69 B shows the processing of serial data "0C." With the Cmark bit set to "0," the compressed symbol "C" is registered at index "1," and symbols "A" and "B" are moved to the next entry. Symbol "C" is output as the decompressed symbol. The entropy calculation value, data mask, and bit count remain unchanged.

[0380] Figure 69 C shows the processing of serial data "0D." With the Cmark bit set to "0," the compressed symbol "D" is registered at index "1," and symbols "C," "A," and "B" are moved to the next entry. Symbol "D" is output as the decompressed symbol. The calculated entropy value becomes 3, and the data mask becomes "00000111." The bit count remains at 1.

[0381] Figure 70A shows the processing of serial data "1100". Index "4" hits based on the Cmark bit "1" and the compressed symbol "100". In this case, the symbol "B" logged in at index "4" moves to index "2" (because k=2), and the symbols "C" and "A" logged in at indexes "2" and "3" move to the next entry. At this time, the hit count becomes 2, so entropy culling is performed and the symbol "A" at the end is deleted. As a result, the entropy calculation value becomes 2, and the data mask becomes "00000011". The hit count is reset.

[0382] Figure 70 B shows the processing of serial data "111." Based on the Cmark bit "1" and the compressed symbol "11," index "3" hits. In this case, symbol "C" logged at index "3" moves to index "1" (since k = 2), and symbols "D" and "B" logged at indexes "1" and "2" move to the next entry. At this point, the hit count becomes 1. Symbol "C" is output as the decompressed symbol. The entropy calculation value is 2, and the data mask is "00000011."

[0383] Figure 70 C shows the processing of serial data "100". Based on the Cmark bit "1" and the compression symbol "00", the index "0" is hit. In this case, the symbol "instruction 1 = instruction EOS" logged at index "0" is read. EOS is executed, and the decompressor 52 recognizes the end of the original symbol string. It can also perform a predetermined process based on this recognition. In addition, Figure 70 In the example shown in C, the case where the trailing symbol "B" is deleted by entropy culling is shown, but it does not need to be deleted.

[0384] According to the fifth embodiment, by exchanging adjacent entries, the range of entries whose registered contents change in response to a hit can be narrowed, and the load and time of the update process of the conversion table can be reduced.

[0385] [Implementation Method 6]

[0386] Next, a compression device and a decompression device according to Embodiment 6 will be described. The structure of Embodiment 6 is similar to that of Embodiment 1, so the differences will be mainly described, and the description of the similarities will be omitted.

[0387] As a sixth embodiment, an example in which the compressor 11 and the decompressor 52 described in the first embodiment are cascade-connected will be described. Figure 71 A compression device 10A according to a sixth embodiment is shown. Figure 71 In the compression device 10A, a plurality of (in Figure 71 In the example, there are three) compressors 11a, 11b, 11c and a serializer 12.

[0388] Original symbol data (N bits) is input to compressor 11a. Compressor 11a has the conversion table described in the first embodiment, and converts the original symbol data (e.g., "ABCDABCDABEF") into an N-bit compressed symbol "ABCD1010ABEF" in a manner where N = four symbols, and outputs it together with the Cmark bit corresponding to the compressed symbol. Compressor 11b also has the same structure as compressor 11a. Compressor 11b converts the N-bit compressed symbol input from compressor 11a into an N-bit compressed symbol "ABCD1002EF" in a manner where N = two symbols, and outputs it together with the corresponding Cmark bit. Compressor 11b is an example of "other compression device."

[0389] The compressor 11 c and the serializer 12 have the same configuration as the compressor 11 and the serializer 12 described in Embodiment 1. The compressor 11 c outputs an M-bit compression code, a Cmark bit, and a data mask.

[0390] Figure 72 A decompression device 50A according to the sixth embodiment is shown. Figure 72 In the decompression device 50A, the deserializer 51 and the decompressors 52a, 52b, and 52c corresponding to the number of compressors (three) included in the compression device 10A are connected in series.

[0391] The deserializer 51 and the decompressor 52a have the same structure as the deserializer 51 and the decompressor 52 in Embodiment 1. The k-bit transmission data (compression device 10A) sent from the compression device 10A is input to the deserializer 51, and the deserializer 51 outputs an M-bit compression symbol and a Cmark bit for the compression symbol.

[0392] The decompressed symbol and Cmark bits from the decompressor 52a are input to the decompressor 52b, which outputs an N-bit compressed symbol and the corresponding Cmark bits. The decompressor 52b is an example of "other decompression device".

[0393] The decompressed symbol and Cmark bits from decompressor 52b are input to decompressor 52c. Decompressor 52v outputs N bits of original symbol data and the corresponding Cmark bits. Decompressor 52a outputs the N-bit decompressed symbol "ABCD1002EF." Decompressor 52b decompresses N = two symbols and outputs the decompressed symbol "ABCD1010ABEF." Decompressor 52c outputs the original symbol data "ABCDABCDABEF."

[0394] According to the sixth embodiment, the compression device 10A and the decompression device 50A have a cascade connection structure consisting of multiple compressors (compressors 11a to 11c) and multiple decompressors (decompressors 52a to 52c) with different bit widths (number of symbols) for compression and decompression. This structure allows the transmission path size of original symbol data having a long bit pattern to be sufficiently reduced.

[0395] [Implementation Method Seven]

[0396] Next, the compression device and decompression device of Embodiment 7 will be described. The structure of Embodiment 7 is similar to that of Embodiment 1, so the differences will be mainly described, and the description of the similarities will be omitted.

[0397] In the seventh embodiment, the translation table is divided into multiple banks. The number of entries in each bank is reduced compared to the number of entries in a single translation table. Therefore, in a software-based implementation, speed can be increased by reducing the number of searches, while in a hardware-based implementation, frequency can be increased.

[0398] The selection of the partitioned table (bank) is performed using a hash function. The hash function is not particularly limited and may use a portion of the bits that make up the original symbol, round-robin bank number assignment, first-order hashing, or second-order hashing.

[0399] Figure 73 A and B are explanatory diagrams of the seventh embodiment. Figure 73 A shows an example of a conversion table included in the compressor 11 of the compression device 10. Figure 73 In the example shown in A, the conversion table having eight entries is divided into four banks #0 to #3 each having two entries. The entries of each bank are assigned index values ​​"0" and "1". As the hash function, a function is applied that hashes the lower 2 bits of the original symbol (N bits) as the bank number.

[0400] For example, for the 8-bit original symbol "A (ASCII code: 01000010)", library #2 is selected based on its low-order 2 bits "10" (3 in binary number). Through the search of library #2, index "1" is hit as an entry logged with the symbol "A". In this case, the compressor 11 generates a compressed symbol with the index number "1" following the library number "10". A Cmark bit "1" indicating compression is added before the compressed symbol. Thus, the original symbol "A" is compressed into 4-bit serial data "1101" and sent to the decompression device 50 as transmission data. In embodiment seven, in each of the compression device 10 and the decompression device 50, entropy calculation is performed for each library, and a data mask is generated for each library.

[0401] As described above, in the case of an entry hit, the symbol data consists of bits representing the Cmark bit "1" + the bank number + the index number. However, in cases where the hash value is determined by the order of the data (for example, in cases where banks are determined cyclically based on the bank number), the bank number may not be included in the symbol data.

[0402] exist Figure 73 In the example of A, the library number and index number are represented by 2 bits and 1 bit respectively, but are expressed in a specified number of bits corresponding to the library number and index number. In the case where the entry does not hit, the symbol data is, for example, a combination of Cmark bit "0" + original symbol. The library is uniquely determined by the hash function, so the same actions as when it is not libraryized can be performed within the library. In the decompressor, the N bits after the Cmark bit "0" can be identified as the original symbol. However, if the same hash function as the compression side is used on the decompression side, the Cmark bit of the symbol data, the library number, the index number, and the position (order) of the original symbol are uniquely determined by the entry usage status within the library.

[0403] like Figure 73 As shown in B, the conversion table of the decompressor 52 of the decompression device 50 also has the same Figure 73 A has the same structure. For example, when serial data "1101" is input, decompressor 52 hashes the following two bits, "10," based on the Cmark bit "1," thereby accessing bank #2 with bank number 2. Furthermore, the least significant bit of the serial data is recognized as an index number, and the symbol registered at index "1" is output as the original symbol. Thus, the original symbol "A" is output.

[0404] Furthermore, since the Cmark bit is "0" for serial data containing the original symbol, decompressor 52 identifies the N bits starting with the least significant bit of the serial data as the original symbol. The library number is determined by hashing the original symbol after the Cmark bit is "0," and the data mask is determined by entropy calculations corresponding to the library. The original symbol is then stored within the library.

[0405] The following configuration may also be adopted: using the entropy calculation unit 112 (522), mask generation unit 113 (523), serializer 12 and deserializer 51 used in embodiment one, and changing the configuration of the number of bits representing the library number and index number in the compression symbol according to the usage status of the entries in the library.

[0406] [Eighth Implementation Method]

[0407] Next, a compression device and a decompression device according to Embodiment 8 will be described. The configuration of Embodiment 8 is similar to that of Embodiment 1, so the differences will be mainly described, and the description of the similarities will be omitted.

[0408] In the compression methods described in Embodiments 1 to 7, the compression symbols are partially complex, making it impossible to restore the original symbols without understanding the structure of the conversion table. Furthermore, since part of the data converted for compression contains the original data, using the compression symbols directly as a password is not ideal. Embodiment 8 addresses this issue. In Embodiment 8, public key encryption is used to encrypt the transmission data sent from the compression device to the decompression device.

[0409] Figure 74 The compression device 10B in the eighth embodiment is shown. Figure 75 The decompression device 50B in the eighth embodiment is shown. The compression device 10B and the decompression device 50B communicate using a public key encryption method.

[0410] like Figure 74 As shown, in addition to the configuration of compression device 10 shown in the first embodiment, compression device 10B further includes a scrambler 14. The data (K bits) output from serializer 12 and the scramble key (public key) are input to scrambler 14. Scrambler 14 encrypts the data through a scramble operation using the scramble key and outputs the encrypted data (encrypted data, K bits). The encrypted data is transmitted as transmission data via a transmission path (network) to decompression device 50B.

[0411] In addition to the structure of the decompression device 50 shown in the first embodiment, the decompression device 50B also includes an inverse scrambling operation unit 53. The encrypted data (K bits) and the scrambling key (public key) sent from the compression device 10B are input to the inverse scrambling operation unit 53. The inverse scrambling operation unit 53 outputs data (K bits) obtained by decrypting the encrypted data through an inverse scrambling operation using the scrambling key. This data is the transmission data in the first embodiment and is input to the deserializer 51. Subsequent processing is the same as in the first embodiment.

[0412] The compression device 10B and the decompression device 50B execute the following process (steps 1 to 3) to start encrypted communication. Step 2 is optional.

[0413] (Step 1) The first key (public key) is sent from the compression device 10B to the decompression device 50B.

[0414] (Step 2) The second key is sent from the compression device 10B to the decompression device 50B. Finally, an EOK (End of Key) command is sent. The EOK command indicates the termination of key exchange.

[0415] (Step 3) The data to be encrypted (original symbol data) is input to the compression device 10B.

[0416] In step 1, a combination of the following parameters is set as a first key in compression device 10: two or more parameters selected from a plurality of parameters set for symbol compression, that is, a combination of one or more parameters selected from a plurality of parameters related to compression and decompression. The parameters include the number of bits N of the original symbol, the number of bits M of the compressed symbol, the number of bits K used in the output from serializer 12, the number of hits or misses used for entropy culling, the setting of exception symbols, the type of scrambling operation, the scrambling key, the adjacent entry swap offset value k, and the bank structure (number of banks).

[0417] For example, the following is an example of combining all the above parameters.

[0418] (8,8,4,+2,EOK by RETI,f(x),0xA5,2,1)

[0419] The above combination represents N = 8, M = 8, K = 4, elimination is performed with two hits / misses, the function f(x) used for the scrambling operation, the scrambling key, k = 2, and the number of banks = 1 (undivided). For example, the function f(x) is "f(x) = X xor cyclic(KEY)", which performs an exclusive OR (XOR) operation on the bit stream X using the cyclic key.

[0420] The second key sent in step 2 is a private key, sent to create the initial state of the conversion table in compression device 10 and decompression device 50. For example, compression device 10 performs the following operation: outputting the "ABACDBC(EOK)(EOK)(EOK)(EOK)(EOK)" command described in Embodiment 5 by repeating it a predetermined number of times (e.g., four times) as shown in "ABACDBC(EOK)". This transmits the private key to decompression device 50. The second key is an example of "information for initializing the state of the second table."

[0421] When output from the serializer 12, the symbols constituting the compressed symbol string "ABACDBC(EOK)" output in the fifth embodiment are serialized as "001000001," "001000010," "110," "001000011," "001000100," "1100," "111," and "100," respectively. These serial data are input to the scrambling operation unit 14.

[0422] The scramble operation unit 14 divides the bit stream of the serial data into N bits (8 in this embodiment) and outputs a value obtained by performing an XOR operation on the bit stream using the round key.

[0423] 00100000 xor 10100101=10000101

[0424] 10010000 xor 11010010=01000010

[0425] 10110001 xor 01101001=11011000

[0426] 00001100 xor 10110100=10111000

[0427] 10001001 xor 01011010=11010011

[0428] 10011110 xor 00101101=10111111

[0429] 01001001 xor 10010110=11011111

[0430] 00100100 xor 01001011=01101111

[0431] The scrambler 14 then serializes the scramble result with K bits (4 in this embodiment). Specifically, it divides the result into 4-bit segments and outputs the result. As a result, the scrambler 14 outputs the serial data of "1000," "0101," "0100," "0010," "1101," "1000," "1011," "1000," "1101," "0011," "1011," "1111," "1101," "1111," "0110," and "1111" as encrypted data.

[0432] In decompression device 50B, the first key in step 1 is received and set in decompression device 50. The first key is used as a common key (scrambling key) for decoding in decompression device 50. Furthermore, decompression device 50 uses the parameter set included in the first key to perform standard settings (configuration settings) for deserializer 51 and decompressor 52 for decompressing data received from compression device 10. According to the above example, the first key is as follows.

[0433] (8,8,4,+2,EOK by RETI,f -1 (x),0xA5,2,1)

[0434] Among them, f -1 (x) is the inverse function of the function f(x) used for scrambling operation, which is “f -1 (x)=X xor cyclic(KEY)".

[0435] The above-mentioned encrypted data is input to the descrambled data processing unit 53 of the decompression device 50. The descrambled data processing unit 53 performs deserialization from K bits (K=4) to M bits (M=8), and performs deserialization using f -1 (x) is calculated as follows.

[0436] 10000101 xor 10100101=00100000

[0437] 01000010 xor 11010010=10010000

[0438] 11011000 xor 01101001=00100001

[0439] 10111000 xor 10110100=00000100

[0440] 11010011 xor 01011010=00001000

[0441] 10111111 xor 00101101=00001100

[0442] 11011111 xor 10010110=00000000

[0443] 01101111 xor 01001011=00000000

[0444] The inverse scrambling operation unit 53 combines the results of the operations and divides them into a format consisting of Cmark bits and compression symbols. The result is serial data identical to the output of the serializer 12: "001000001," "001000010," "110," "001000011," "001000100," "1100," "111," "100." In other words, the encrypted data is decrypted. This serial data group is used to generate the initial state of the conversion table in the decompressor 52. In the decompression device 50, the end of the symbol string used to create the initial state of the conversion table is detected by detecting the repetition of the "EOK" command.

[0445] In this manner, based on the first key, a common, standardized state is established in the compression device 10 and the decompression device 50. Based on the second key, the compression device 10 initializes its conversion table, and the decompression device 50 initializes its conversion table using the second key transmitted from the compression device 10. This generates an initial state of the conversion table synchronized between the compression device 10 and the decompression device 50. The compression device 10 then encrypts the compressed result of the original symbol string using the first key and transmits it as transmission data to the transmission path. The decompression device 50 decodes the transmission data received from the transmission path using the first key and performs decompression processing. According to the eighth embodiment, data flowing through the transmission path can be encrypted.

[0446] [Implementation Method 9]

[0447] The compression device and decompression device shown in the first to eighth embodiments may be implemented based on software or hardware.

[0448] <Software-based implementation example>

[0449] Figure 76The following illustrates configuration examples of terminal devices applicable to the compression and decompression devices of Embodiments 1 to 8. The terminal device 30 is a general-purpose or dedicated computer (information processing device). A general-purpose computer may be, for example, a personal computer (PC) or a workstation. A dedicated computer may be, for example, a server machine. Furthermore, the terminal device 30 may be a fixed terminal or a wireless terminal. Wireless terminals include smart devices such as smartphones and tablet terminals. Furthermore, the terminal device 30 may also include a car navigation device, a gaming device, and the like.

[0450] like Figure 1 As shown, the terminal device 30 includes a storage device 32 , an input device 33 , an output device 34 , and a communication interface (communication IF) 35 , which are connected to a CPU 31 via a bus, for example.

[0451] The storage device 32 includes a main storage device and an auxiliary storage device. The main storage device serves as a work area for the CPU 31, a storage area for programs and / or data, and a buffer area for communication data. The main storage device is a so-called memory, such as a random access memory (RAM) or a combination of RAM and read-only memory (ROM).

[0452] The auxiliary storage device stores programs executed by the CPU 31 and data used during program execution. Examples of auxiliary storage devices include hard disk drives (HDDs), solid state drives (SSDs), flash memories, and electrically erasable programmable read-only memories (EEPROMs). Furthermore, the auxiliary storage device includes removable storage media that are attachable to and detachable from the information processing device. Examples of removable storage media include Universal Serial Bus (USB) memory.

[0453] The input device 33 is used to input information and data into the terminal device 30. Examples of the input device 33 include buttons, a keyboard, a pointing device such as a mouse, a touch panel, and the like. The input device 33 may include a voice input device such as a microphone. Furthermore, the input device 33 may include an imaging device such as a camera or image scanner, or a sensor for acquiring sensor data.

[0454] The output device 34 outputs information and data. The output device is, for example, a display device. The output device 34 may include a sound output device such as a speaker. The communication IF 35 is connected to a data transmission path (network). The communication IF 35 is, for example, a Local Area Network (LAN) card. The communication IF 35 may include a wireless circuit for wireless communication. There is no limitation on the wireless communication standard, for example, 3G (W-CDMA, Wideband Code Division Multiple Access, etc.), Long Term Evolution (LTE, Long Term Evolution), wireless LAN (IEEE802.11 series, Wi-Fi), Bluetooth (registered trademark), low-power Bluetooth, etc. can be applied. However, the communication standard is not limited to this.

[0455] CPU 31 is an example of a processor and loads and executes programs stored in storage device 22. An operating system (OS) and application programs are installed in storage device 32. CPU 31 executes the programs, and terminal device 30 functions as compression devices 10, 10A, 10B and decompression devices 50, 50A, 50B as described in Embodiments 1 to 9.

[0456] That is, the CPU 31 can function as the compressor 11 (compressors 11a to 11c) and the serializer 12. In other words, it can function as Figure 11 、 Figure 15 The main body of the working example shown. In addition, the CPU 31 works as a deserializer 51 and a decompressor 52 (decompressors 52a to 52c). In other words, it can be Figure 21 and Figure 22 The CPU 31 is the subject of the working example shown. In addition, the CPU 31 may be the subject that recognizes and executes instructions.

[0457] The conversion table is stored in storage device 32. However, it may also be stored in a device other than storage device 32. The original symbol data is obtained through input from input device 33 and reception via communication interface 35. Communication interface 35 is used to transmit and receive transmission data. Output device 34 can be used to output and display the original symbol data obtained by decompression.

[0458] In addition, the processing performed in CPU 31 can also be performed by multiple CPUs (processors). At least a part of the processing performed in CPU 31 can be performed by a processor other than the CPU, such as a Digital Signal Processor (DSP). In addition, as described above, at least a part of the processing performed in CPU 31 can also be performed by hardware. Hardware includes, for example, integrated circuits such as Field Programmable Gate Array (FPGA), IC, LSI, Application Specific Integrated Circuit (ASIC). In addition, the compression device and the decompression device can also be implemented by a combination of circuits and processors such as MCU (Micro Control Unit), SoC (System-on-a-Chip), etc.

[0459] <Hardware-based implementation example>

[0460] <<Circuit Configuration of Compression Device>>

[0461] Figure 77 FIG. 1 shows an example of a circuit configuration of the compression device 10. Figure 77 In the figure, the compression device 10 includes a flip-flop (F / F) 61 for maintaining the original symbol data of the decompression device, a table circuit 62, an operation circuit 63 of the conversion table, a compression / non-compression determination circuit 64, a circuit 65 that works as an entropy calculation unit 112 and a mask generation unit 113, and a barrel shifter 66 that works as a serializer 12.

[0462] The table circuit 62 has n (index "0" to "n-1", Figure 77 (For example, n=4) storage areas 621 are used as entries in the conversion table. The "v" in the storage area 621 is information (a bit) indicating whether the entry is in use (whether the original symbol is stored). For example, when the v bit is "0", it indicates that the entry is empty, and when the v bit is "1", it indicates that the entry is in use.

[0463] The determination circuit 64 includes a comparator 641 and a selector 642. The outputs from each storage area 621 and the output from F / F 61 (original symbol) are input to the comparator 641. The comparator 641 compares the value of the original symbol with the value from each storage area 621. If no storage area 621 matches, the comparator outputs a Cmark bit of "0." On the other hand, if a storage area 621 exists that outputs the same value as the original symbol, the comparator outputs a Cmark bit of "1" and the index value (INDEX) of the storage area 621.

[0464] The selector 642 has an input terminal to which the original symbol of the F / F 61 and the index value from the comparator 641 are input. The selector 642 also has a control terminal and an output terminal. The Cmark bit is input to the control terminal. When the Cmark bit is "0," the output terminal outputs the original symbol as a compressed symbol. When the Cmark bit is "1," the output terminal outputs the index value as a compressed symbol.

[0465] The operation circuit 63 includes a selector 631 and a selector 632. The selector 632 has an input terminal, a control terminal, and an output terminal. The symbols stored at indexes "1" to "n-1" are input to the input terminal; the index value of the storage area 621 (entry) where the symbol identical to the original symbol is registered is input to the control terminal; and the symbol matching the index value is input to the selector 631 at the output terminal.

[0466] Selector 631 has an input terminal, which receives the output from selector 632 and the original symbol from F / F 61, and a control terminal, which receives the Cmark bit. Selector 631 also has an output terminal, which outputs the original symbol to the beginning of storage area 621 (indexed "0") when the Cmark bit is "0," and outputs the symbol from selector 632 to storage area 621 indexed "0" when the Cmark bit is "1."

[0467] Each storage area 621 is connected to the next storage area 621 in the direction of increasing index value. When the Cmark bit "1" is received, if a symbol is stored in the storage area 621, the symbol is moved to the next storage area 621. However, for the storage area 621 with index "n-1", the symbol value is overwritten.

[0468] Furthermore, the index value from the comparator 641 is input to the storage area 621. The storage area 621 includes, for example, a magnitude comparator. When the input index value is greater than its own index value, the stored symbol value is input to the selector 632. However, this is limited to the case where a symbol is stored (when the v bit value is "1"). In this way, the symbol is moved to the first entry when an entry hits, and is moved to the next entry (a push operation).

[0469] The index value, Cmark bit, and v bit of each storage area 621 are input to circuit 65. The v bit indicates the usage rate of the conversion table. When the Cmark bit is "1," circuit 65 performs entropy calculation using the first or second calculation method. Circuit 65 generates a data mask corresponding to the entropy calculation value and inputs it to barrel shifter 66.

[0470] In the ninth embodiment, the table circuit 62, the determination circuit 64, and the operation circuit 63 operate as the sign conversion unit 111. Alternatively, a count indicating the number of used storage areas 621 (entries) may be used instead of the v bit.

[0471] The Cmark bit, the compression symbol from the selector 642, and the data mask from the circuit 65 are input to the barrel shifter 66. The barrel shifter 66 outputs the Cmark bit + the compression symbol in units of K bits. The output of the barrel shifter 66 is sent to the decompression device 50 as transmission data.

[0472] Furthermore, when the Cmark bit is "0," the circuit is configured such that the data mask "11111111" is input from circuit 65 to the barrel shifter, regardless of the entropy calculation value. Alternatively, when the Cmark bit is "0," circuit 65 may not output the data mask, and barrel shifter 66 may directly output the compression code directly after the Cmark bit.

[0473] <<Circuit Structure of Decompression Device>>

[0474] Figure 78 FIG. 5 shows a circuit configuration example of the decompression device 50. Figure 78 The decompression device 50 shown in FIG. Figure 77 The decompression device 50 has a structure corresponding to the compression device 10 shown in FIG. The decompression device 50 includes a barrel shifter 76 operating as a deserializer 51, a circuit 75, an AND circuit 77, an F / F 71, a table circuit 72, a conversion table operation circuit 73, and a decompression necessity determination circuit 74.

[0475] The transmission data sent through the transmission path is input to the barrel shifter 76. The barrel shifter separates the Cmark bit and the compression symbol and outputs them. The Cmark bit is input to the circuit 65, and the compression symbol is input to the input terminal of the AND circuit 77.

[0476] Table circuit 72 has the same structure as table circuit 62 and includes a plurality of (n) symbol storage areas 721 (entries). Each storage area 721 is set with the aforementioned v bit, and the v bit of each storage area 721 is input to circuit 75 as information indicating the usage status of the conversion table.

[0477] Circuit 75 operates as an entropy calculation unit 522 and a mask generation unit 523, performing entropy calculation and generating a data mask corresponding to the calculation result. Furthermore, circuit 75 inputs the data mask to the input terminal of AND circuit 77. Furthermore, the number of bits of the compression symbol input from barrel shifter 76 to AND circuit 77 is determined by the number of significant bits indicated by the data mask.

[0478] AND circuit 77 performs an AND operation on the compression symbol and the data mask, and outputs the result to F / F. When the Cmark bit is "1," circuit 75 outputs a data mask indicating the number of valid bits corresponding to the calculated entropy value. When the Cmark bit is "0," a data mask indicating that all bits are valid is output, regardless of the calculated entropy value. However, when the Cmark bit is "0," circuit 75 may not output a data mask, and the compression symbol output from barrel shifter 66 may be input directly to F / F 71.

[0479] Decision circuit 74 includes selector 741 and selector 742. The outputs from each storage area 621 and the output from F / F 71 are input to selector 741. If the compressed symbol output from F / F 71 and input to the control terminal of selector 741 is an original symbol, selector 741 stops outputting the compressed symbol from selector 741 to selector 742. Conversely, if the compressed symbol input from the control terminal is an index value, selector 741 inputs the original symbol read from storage area 721 corresponding to the index value to selector 742.

[0480] If there is an input from selector 741, selector 742 outputs the input. If there is no input from selector 741, it outputs the input from F / F 71. Thus, if the output from F / F 71 is an original symbol, the original symbol is output from selector 742. Conversely, if the input from F / F 71 is an index value, selector 742 outputs the original symbol output from selector 741.

[0481] The operation circuit 73 includes a selector 731 and a selector 732. The selector 732 includes an input terminal, a control terminal, and an output terminal. The symbols stored at indexes "1" to "n-1" are input to the input terminal; the index value of the storage area 621 (entry) where the symbol identical to the original symbol is stored is input to the control terminal; and the output terminal inputs the symbol matching the index value to the selector 731.

[0482] Selector 731 has an input terminal, which receives the output from selector 732 and the original symbol from F / F 71, and a control terminal, which receives the Cmark bit. Selector 731 also has an output terminal, which outputs the original symbol to the first storage area 721 (indexed "0") when the Cmark bit is "0," and outputs the symbol from selector 732 to the storage area 721 indexed "0" when the Cmark bit is "1."

[0483] Each storage area 721 is connected to the next storage area 721 in the direction of increasing index value. When the Cmark bit "1" is received, if the storage area 721 stores a symbol, the symbol is moved to the next storage area 721. However, for the storage area 621 with index "n-1", the symbol value is overwritten.

[0484] Furthermore, the index value from F / F 71 is input to storage area 721. Storage area 721 includes, for example, a magnitude comparator. When the input index value is greater than its own index value, the stored sign value is input to selector 732. However, this is limited to the case where a sign is stored (when the v bit value is "1"). In this way, the sign is moved to the first entry when an entry hit is found, and is moved to the next entry (a push operation).

[0485] As shown in the ninth embodiment, the compression device and the decompression device can be implemented based on software or hardware.

[0486] [Implementation Method 10]

[0487] As a tenth embodiment, a second entropy calculation method, which differs from the entropy calculation method (first calculation method) described in the first embodiment, will be described. In the second entropy calculation method, entropy is calculated using the conversion table usage rate and entry hit rate in compression processing for the past T symbols. For example, the entropy value E is calculated using the following equation 2 instead of ceil(log2k) in the first calculation method.

[0488] Formula 2: E = ceil(log2((usage rate / hit rate)*number of entries))

[0489] The usage rate and hit rate represent the usage rate and hit rate of the conversion table for the compression results of the past T symbols (T is a positive integer). The entropy value E is in the range of 0 ≤ E ≤ M. M is the maximum word length of the data mask of the compressor and decompressor. If E is negative, it is set to 0.

[0490] The second calculation method relies on past statistics of hit rates and table usage rates. Therefore, during compression, there may be cases where the index hit by the original symbol exceeds the range of indices represented by the value obtained by the entropy calculation using Formula 2 (for example, when E=2, index "7" hits). Therefore, compression and decompression are performed using a method different from that of the first embodiment.

[0491] Figure 79 1 is a flowchart showing an example of processing of the compressor using the second calculation method in the tenth embodiment. The processing of the compressor 11 in the tenth embodiment is similar to the processing of the compressor in the first embodiment ( Figure 15 ), the difference is that S12A processing is set between S12 and S13.

[0492] In S12A, the compressor 11 determines whether the index value of the entry hit in S12 is 2 to the power of E or greater. If the index value is not 2 to the power of E or greater (less than 2 to the power of E), the process proceeds to S13, performing the same operations as in the first embodiment. Conversely, if the index value is 2 to the power of E or greater, the compressor 11 proceeds to S14 and outputs Cmark "0" in S15. That is, if the index value is 2 to the power of E or greater, it is considered a miss (not registered).

[0493] Figure 80 1 is a flowchart showing an example of processing of a decompressor using the second calculation method in the tenth embodiment. The processing of the decompressor 52 in the tenth embodiment is similar to the processing of the decompressor in the first embodiment ( Figure 22 ), the difference is that S38A, S38B, S38C, and S38D are set instead of S38, S39, S40, and S41.

[0494] In S31, if the Cmark bit is determined to be "0", the decompressor 52 searches for the compression code in the entry with the index value of 2 to the power of E or later in the conversion table (S38A). If the compression code is determined to be a hit (S38B, Yes), the decompressor 52 performs the operation of the first operation method when a hit occurs (see Figure 16C)(S38C), that is, the hit compressed symbol is output as the original symbol (decompressed symbol), and the compressed symbol is moved to a specified position (for example, the beginning of the entry), and the symbols logged in the previous entry from the beginning entry to the hit entry are moved to the next entry.

[0495] On the other hand, when it is determined that the compression symbol does not hit (miss) (S38B, No), the decompressor 52 performs the miss operation of the first operation method ( Figure 16 (B))(S38D). That is, the decompressor 52 registers the compression symbol in the first entry and moves the symbols registered in the entries after the first entry to the next entry. If the processing of S38C or S38D is completed, the processing enters S36. In addition to the above points, Figure 79 and Figure 80 The processing instructions are the same as in Figure 15 and Figure 22 The processing shown in is the same, so the description of the same processing is omitted.

[0496] Figure 81 A and B, Figure 82 A and B, Figure 83 A and B, Figure 84 A and B and Figure 85 An example of a second method for calculating entropy is shown. The entropy value is calculated using the usage rate and hit rate in the input (compression processing) of the symbol for the past T=5 times. In addition, in this calculation example, it is assumed that no changes in the login position due to entry hits and no deletions of entries accompanied by hit numbers or misses are performed. The calculation formula for the entropy value E is Formula 2, that is, E=ceil(log2((usage rate / hit rate)*number of entries)). The range of E is 0≤E≤M, where M is the longest number of bits of the data mask.

[0497] Figure 81 A shows the initial state in the calculation example. Assume that a symbol string of "ABCABABDAB" is input as an example of input data. Figure 81 As shown in the upper left of A, no symbol is registered in the initial state conversion table (number of entries = 4, index "0" to "3", so M = 2). Figure 81 The table below A shows the usage rate and hit rate of the conversion table and the average value for each of the five symbols input in the past (before the fourth input, before the third input, before the second input, and now). Figure 81 In the example shown in A, the initial value of the average usage rate is set to "0 / 20" and the initial value of the average hit rate is set to "5 / 5." However, the initial value of the average usage rate can also be set to "4 / 4" and the initial value of the average hit rate can be set to "0." In this case, the entropy value E is 0.

[0498] Figure 81 B shows a calculation example where the symbol "A" is input and registered in the conversion table. The current usage rate is "1 / 4," and its average value is "1 / 20." Furthermore, the average hit rate is "4 / 5." Furthermore, the calculated entropy value based on Equation 2 is "-2." Since the calculated result is less than the range of E, the entropy value is 0, which is the lower limit of E's range.

[0499] Figure 82 A shows a calculation example for the case where symbol "B" is input after symbol "A" and logged into the conversion table. The current usage rate is "2 / 4," and its average value is "3 / 20." Furthermore, the average hit rate is "3 / 5." The calculated entropy value and the value of E at this time are both "0." Furthermore, in the compression processing for symbol "B" at this time, symbol "B" is a miss, and symbol "B" is output as a compressed symbol, so no data mask is used. While the number of entries used is 2, the number of valid bits represented by the data mask is 0. However, since no data mask is used, no conflicts arise on the decompression side.

[0500] Figure 82 B shows a calculation example where the symbol "C" is input after the symbol "B" and registered in the conversion table. The current usage rate is "3 / 4," and its average value is "6 / 20." Furthermore, the average hit rate is "2 / 5." The calculated entropy value at this time is "1.58," and the entropy value E is 2.

[0501] Figure 83 A shows a calculation example for the case where the symbol "A" is input after the symbol "C" and the index "2" is hit. The current usage rate is "3 / 4," and its average value is "9 / 20." Furthermore, the average hit rate is "2 / 5." The calculated entropy value at this point is "2.16," but since it exceeds the upper limit of E's range of "2," the value of E is capped at the upper limit of "2."

[0502] Figure 83 B shows a calculation example for the case where symbol "B" is input after symbol "A" and index "1" is hit. The current usage ratio is "3 / 4," and its average value is "12 / 20." Furthermore, the average hit rate is "2 / 5." The calculated entropy value at this point is "2.58," but since it exceeds the upper limit of E's range of "2," E's value reaches the upper limit of "2."

[0503] Figure 84A shows a calculation example for the case where symbol "A" is input after symbol "B" and index "2" is hit. The current usage ratio is "3 / 4," and its average value is "14 / 20." Furthermore, the average hit rate is "3 / 5." The calculated entropy value at this point is "2.22," but since it exceeds the upper limit of E's range of "2," E's value reaches the upper limit of "2."

[0504] Figure 84 B shows a calculation example for the case where symbol "B" is input after symbol "A" and index "1" is hit. The current usage ratio is "3 / 4," and its average value is "15 / 20." Furthermore, the average hit rate is "4 / 5." The calculated entropy value at this time is "1.90," and the entropy value E is 2.

[0505] Figure 85 A shows a calculation example where the symbol "D" is input after the symbol "B" and registered in the conversion table. The current usage ratio is "4 / 4," and its average value is "16 / 20." Furthermore, the average hit rate is "4 / 5." The calculated entropy and E value at this time are "2."

[0506] Figure 85 B shows a calculation example for the case where symbol "A" is input after symbol "D" and index "3" is hit. The current usage ratio is "4 / 4," and its average value is "17 / 20." Furthermore, the average hit ratio is "4 / 5." The calculated entropy value at this point is "2.08," but since it exceeds the upper limit of E's range of "2," the value of E is capped at "2."

[0507] Figure 86 The following example shows a calculation where the symbol "B" is input after the symbol "A" and the index "2" is hit. The current usage ratio is "4 / 4," and its average value is "18 / 20." Furthermore, the average hit ratio is "4 / 5." The calculated entropy value at this point is "2.17," but since it exceeds the upper limit of E's range of "2," the value of E is capped at the upper limit of "2."

[0508] [Performance evaluation of calculation methods]

[0509] An experiment was conducted to demonstrate whether the entropy calculation described in Embodiments 1 to 10 can accurately express Shannon's mean information entropy. The compression device 10 described in Embodiment 1 was used, and the first and second entropy calculation methods were used to calculate and record entropy each time an original symbol was input. The average values ​​of the calculation results based on the first and second calculation methods at the end of processing the entire original symbol string were compared with the Shannon's mean information entropy for the entire original symbol string.

[0510] In the experiment, the configuration of the compression device 10 was set to 100 for the number of past symbols T in the second calculation method (Implementation 10). Furthermore, the number of entries in the translation table was set to 256. Entropy culling was triggered by four hits. Furthermore, in the experiment, k = 8 was used. Therefore, when an entry hit occurred, the entry's entry content was moved to an index position eight backtracked from the entry's index, and the content of the entries located at this moved position to the hit entry position was shifted one by one.

[0511] For data with a selectable number of types from 1 to 256, the number of types is determined (for example, 128 (0 to 127)). For data with 128 types, the entropy of the original symbol sequence when the data (original symbol) is randomly generated is calculated for each occurrence of the original symbol, and the overall average value is calculated. Furthermore, the Shannon's mean information entropy is calculated for the original symbol sequence and compared.

[0512] Figure 36 This is a graph showing the experimental results. The vertical axis represents entropy, and the horizontal axis represents the number of data (symbol) types. The dotted line represents Shannon's mean information entropy. The bold line represents the graph when the first calculation method (Equation 1) is used, and the thin line represents the graph when the second calculation method (Equation 2) is used. The dashed line represents the case when there are 64 data types.

[0513] When 64 types of data appear, they can be expressed using 6 bits, so the values ​​in the Shannon entropy graph and the second calculation method graph are almost 6. Therefore, the value obtained by the second calculation method using Equation 2 is consistent with the theoretical value of entropy. The entropy value in the first calculation method graph is 5.66, which is almost the theoretical value. However, since it is slightly off the theoretical value, it shows that the compression code can be expressed with fewer bits.

[0514] [Implementation Method Eleven]

[0515] The eleventh embodiment is described. The eleventh embodiment is a modified example of the fourth and fifth embodiments. In the fourth and fifth embodiments, the registered symbols are fixed for the reserved entry area of ​​the conversion table and will not be the subject of table update accompanying the hit / miss of the entry (see Figure 54 A. Figure 66 A).

[0516] However, in the case of RERI and RETO, if the reserved entry is controlled to be not empty, it may be used as the exchange object when the entry hits. Figure 53 In the C state, you can also Figure 87A instead of the process described in the fourth embodiment Figure 54 The process shown in A. That is, when symbol "A" is input and index "3" hits, the compressor 11 may move symbol "A" to the first index "0" and symbols "C", "F", and "B" to the next entry respectively.

[0517] Or, in Figure 65 In the C state, you can also Figure 87 A instead of the process described in the fourth embodiment Figure 54 The process shown in A. That is, when symbol "A" is input and index "2" hits, the compressor 11 may move symbol "A" to the first index "0" and move symbols "instruction 1" and "B" to the next entry, respectively.

[0518] In this case, "Instruction 1" is treated as the original symbol, and the content of the "Instruction 1" entry loses its meaning as an instruction, but compression and decompression function normally. Therefore, even though the content of the retained entry is replaced, RETI and RETO can still be implemented. However, this requires that the retained entry is not left empty due to table reset instructions or entropy culling. This control prevents the retained entry from being sacrificed, thereby improving the compression ratio.

[0519] The features of the above-described embodiments can be combined as appropriate. The features described in Embodiment 2 and later are optional and not essential components. Conversely, the features described in Embodiment 2 and later, particularly the features for sending instructions from the compression side to the decompression side described in Embodiments 3 and 4, can be applied to devices other than compression devices and decompression devices that change the number of significant bits of an index through entropy calculation. For example, they can be applied to the compression device and decompression device described in the reference example.

[0520] (Explanation of Reference Numerals)

[0521] 10: compression device; 11: compressor; 12: serializer; 50: decompression device;

[0522] 51: deserializer; 52: decompressor; 111, 521: symbol conversion unit;

[0523] 112, 522: Entropy calculation unit; 113, 523: Data mask.

Claims

1. A data compression and decompression method, characterized in that: The compression unit performs the following processes: When the input symbol is not registered in a first table having a plurality of entries, registering the symbol in one of the plurality of entries and outputting uncompressed index data indicating the symbol; and, if the symbol is already registered in the table, outputting index data indicating compression and position information indicating the position of the entry in which the symbol is registered and having a size smaller than that of the symbol; The decompression device performs the following processing: Upon receiving the index data indicating the non-compression and the symbol, registering the symbol in a second table having the same data structure as the first table using the same method as the symbol registration method of the compression device, and outputting the symbol; and, upon receiving the index data indicating the compression and the position information, reading and outputting the symbol of the entry registered in the second table indicated by the position information, When outputting the index data representing the compression and the position information, the compression device outputs the position information represented by a first digit based on the information representing the usage status of the plurality of entries of the first table, wherein the first digit is the minimum number of digits that can represent the position information of the entry in use in the first table. When receiving the indicator data representing the uncompressed data and the symbol and logging the symbol into the second table, the decompression device extracts the position information from the bit stream sent from the compression device and input into the decompression device based on the information representing the usage status of the multiple entries of the second table and using a second bit number calculated by the same calculation method as the first bit number, wherein the second bit number is the minimum bit number that can express the position information of the entry in use in the second table.

2. The data compression and decompression method according to claim 1, wherein: The compression device calculates the first bit number using the number k of entries in use in the first table and the following equation 1: The decompression device calculates the second bit number using the number k of entries in use in the second table and the following formula 1: Formula 1: ceil(log2k).

3. The data compression and decompression method according to claim 1, wherein: The compression device calculates the first bit number using the usage rate of the first table, the hit rate of entries in which symbols are registered, and the following formula 2, as a result of compression processing on a predetermined number of symbols. The decompression device calculates the second bit number using the usage rate of the second table, the hit rate of entries where symbols are registered, and the following formula 2, as a result of decompression processing of a predetermined number of symbols. Formula 2: ceil(log2((usage rate / hit rate)*number of entries)).

4. The data compression and decompression method according to any one of claims 1 to 3, wherein: The position information is index numbers assigned to the plurality of entries in the first table and the second table in order starting from the head entry.

5. The data compression and decompression method according to any one of claims 1 to 3, wherein: When an entry for the symbol is hit in a search of the first table of the symbol, the compression device moves the symbol to the first entry of the first table, and moves the symbols registered in entries between the first entry of the first table and the entry immediately preceding the hit entry to the next entry. When an entry in which the symbol is logged is hit in a search of the second table of the symbol, the decompression device moves the symbol to the entry at the beginning of the second table, and moves the symbol logged in an entry between the entry at the beginning of the second table and the entry before the hit entry to the next entry.

6. The data compression and decompression method according to any one of claims 1 to 3, wherein: When an entry in which the symbol is logged is hit in a search of the first table of the symbol, the compression device logs the symbol logged in the hit entry in a predetermined moving object entry closer to the beginning than the hit entry, and moves the symbol logged in an entry between the moving object entry and the entry immediately preceding the hit entry to the next entry in the first table. In the case where an entry for the symbol is hit in the search of the second table of the symbol, with respect to the second table, the decompression device logs the symbol in the hit entry in a specified moving object entry that is closer to the beginning side than the hit entry, and moves the symbol logged in the entry between the moving object entry and the previous entry of the hit entry to the next entry.

7. The data compression and decompression method according to claim 6, wherein: The predetermined entry to be moved is a leading entry in the first table and the second table.

8. The data compression and decompression method according to claim 6, wherein: In the first table and the second table, the predetermined entry to be moved is an entry located a predetermined number of times back in time from the hit entry toward the beginning. When the position after backtracking the predetermined amount exceeds the head, the compression device and the decompression device set the head entry as the target of movement.

9. The data compression and decompression method according to any one of claims 1 to 3, wherein: When all entries of the first table are in use and no entry in which the symbol is registered is found in a search of the first table for the symbol, the compression device registers the symbol in the first entry of the first table, moves the symbols registered in entries between the first entry and the entry immediately preceding the last entry in the first table to the next entry, and deletes the symbol registered in the last entry. When all entries of the second table are in use and the entry in which the symbol is logged is not hit in the search of the second table for the symbol, the decompression device logs the symbol in the first entry of the second table, moves the symbols logged in the entries between the first entry and the previous entry of the last entry in the second table to the next entry, and deletes the symbol logged in the last entry.

10. The data compression and decompression method according to any one of claims 1 to 3, wherein: When the entry in which the symbol is registered is not hit in the search of the first table of the symbol, if the first entry in the first table is in an empty state, the compression device registers the symbol in the first entry in the first table; if all entries in the first table are in use, the compression device overwrites the first entry registered in the first table with the symbol. When no entry logged with the symbol is hit in the search of the second table of the symbol, if the first entry in the second table is empty, the decompression device logs the symbol in the first entry in the second table; if all entries in the second table are in use, the decompression device overwrites the first entry logged in the second table with the symbol.

11. The data compression and decompression method according to claim 10, wherein: The first entry in the first table is the last entry in the first table, The first entry in the second table is the last entry in the second table.

12. The data compression and decompression method according to any one of claims 1 to 3, wherein: Regarding the first table, when the number of hits or the number of misses of entries registered with symbols reaches a predetermined value, the compression device deletes the symbol in the entry with the largest index number among the entries registered with symbols. Regarding the second table, when the number of hits or the number of misses of entries registering symbols reaches a predetermined value, the decompression device deletes the symbol in the entry with the largest index number among the entries registering symbols.

13. The data compression and decompression method according to claim 12, wherein: Regarding the first table, when the entry with the largest index number corresponds to an entry located in a predetermined range from the beginning, the compression device does not delete the symbol in the entry with the largest index number. Regarding the second table, when the entry with the largest index number corresponds to an entry located in a predetermined range from the beginning, the decompression device does not delete the symbol in the entry with the largest index number.

14. The data compression and decompression method according to any one of claims 1 to 3, wherein: A command symbol indicating a command is registered in the same predetermined entry in the first table and the second table. The compression device outputs index data indicating compression and position information indicating the specified item, and executes the command indicated by the command symbol. The decompression device reads the command symbol in the prescribed entry registered in the second table based on the index data indicating the compression received from the compression device and the position information indicating the prescribed entry, and executes the command indicated by the command symbol.

15. The data compression and decompression method according to any one of claims 1 to 3, wherein: The command symbol indicating the command to be executed by the decompression device is registered in the same predetermined entry in the first table and the second table. The compression device outputs the index data representing non-compression and the command symbol, In the registration process based on the command symbol indicating the uncompressed index data, the decompression device executes the command indicated by the command symbol as an exception process for a case where the command symbol is already registered in the second table.

16. The data compression and decompression method according to any one of claims 1 to 3, wherein: When the decompression device is caused to execute the command, the compression device outputs index data indicating compression and position information of an entry indicating an empty state of the first table. In the reading process of the symbol representing the compressed indicator data and the position information received from the compression device, when an exception occurs because the symbol is not logged in the entry of the second table represented by the position information, the decompression device obtains the information representing the command and executes it.

17. The data compression and decompression method according to claim 16, wherein: The compression device outputs the index data indicating the compression and the position information of the entry indicating the empty state of the first table, and then outputs the index data indicating the non-compression and the command symbol indicating the command. The decompression device executes the command represented by the command symbol when the exception occurs.

18. The data compression and decompression method according to any one of claims 1 to 3, wherein: When the decompression device is instructed to execute the command, the compression device outputs the index data indicating non-compression and the symbol registered in the first table. In the registration process based on the symbol indicating the uncompressed index data received from the compression device, when an exception occurs due to the same symbol being registered in the second table, the decompression device obtains information indicating the command and executes it.

19. The data compression and decompression method according to claim 18, wherein: The compression device outputs the index data indicating the non-compression and the symbol registered in the first table, and then outputs the index data indicating the non-compression and the command symbol indicating the command. The decompression device executes the command represented by the command symbol when the exception occurs.

20. The data compression and decompression method according to any one of claims 1 to 3, wherein: The symbols are symbols used to constitute a symbol string compressed by another compression device located at a previous stage of the compression device. The symbols output by the decompression device are input as part of the symbol string to another decompression device located at a subsequent stage of the decompression device.

21. The data compression and decompression method according to any one of claims 1 to 3, wherein: The first table and the second table are one of a plurality of libraries obtained by partitioning a table, and the first table and the second table are selected using the same hash function.

22. The data compression and decompression method according to any one of claims 1 to 3, wherein: The compression device sends a public key to the decompression device, wherein the public key includes a combination of two or more parameters selected from a plurality of parameters set for compression processing of the symbol. Thereafter, the compression device encrypts a combination of the uncompressed indicator data and the symbol and a combination of the compressed indicator data and the position information using the public key, and sends the encrypted result to the decompression device. In order to output the decompression processing of the symbol, the decompression device uses a combination of the uncompressed indicator data and the symbol or a combination of the compressed indicator data and the position information to set the two or more parameters in the public key sent from the compression device, and uses the public key to decode the encrypted result, and performs the decompression processing on the decoded result.

23. A data compression method, characterized in that: The compression unit performs the following processes: When the input symbol is not registered in a first table having a plurality of entries, registering the symbol in one of the plurality of entries and outputting uncompressed index data indicating the symbol; When the symbol is already registered in the table, outputting index data indicating compression and position information indicating the position of the entry in which the symbol is registered and having a size smaller than that of the symbol; and a process of changing the size of the location information according to the usage status of the plurality of entries, In the process of outputting the index data representing the compression and the position information, the position information expressed by the minimum number of bits that can express the position information of the entries in use in the first table is output based on the information representing the usage status of the multiple entries in the first table.

24. A data compression device, characterized in that: Includes a compressor that does the following: When the input symbol is not registered in a first table having a plurality of entries, registering the symbol in one of the plurality of entries and outputting uncompressed index data indicating the symbol; and, when the symbol is already registered in the table, outputting index data indicating compression and position information indicating the position of the entry in which the symbol is registered and having a size smaller than the size of the symbol, In the process of outputting the index data representing the compression and the position information, the compressor outputs the position information expressed by the minimum number of bits that can express the position information of the entries in use in the first table based on the information representing the usage status of the multiple entries in the first table.

25. A recording medium having a program recorded thereon, characterized in that: The program causes the computer to execute the following processing: When the input symbol is not registered in a first table having a plurality of entries, registering the symbol in one of the plurality of entries and outputting uncompressed index data indicating the symbol; and, when the symbol is already registered in the table, outputting index data indicating compression and position information indicating the position of the entry in which the symbol is registered and having a size smaller than the size of the symbol, In the process of outputting the index data representing the compression and the position information, the position information expressed by the minimum number of bits that can express the position information of the entries in use in the first table is output based on the information representing the usage status of the multiple entries in the first table.

26. A data decompression method, characterized in that: The decompression device performs the following processing: Upon receiving index data and a symbol indicating non-compression transmitted from a compression device, registering the symbol in a second table having the same data structure as the first table of the compression device using the same method as the symbol registration method of the compression device, and outputting the symbol; and a process of reading and outputting the symbol from the entry in the second table indicated by the position information upon receiving the index data indicating the compression and the position information indicating the position of the entry in the first table where the symbol is registered, The position information is expressed by a first digit, wherein the first digit is a minimum number of digits capable of expressing the position information of the entry in use in the first table, and the first digit is calculated based on information indicating the usage status of the plurality of entries in the first table when the compression device outputs the index data indicating the compression and the position information. When receiving the indicator data representing the uncompressed data and the symbol and logging the symbol into the second table, the decompression device extracts the position information from the bit stream sent from the compression device and input into the decompression device based on the information representing the usage status of the multiple entries of the second table and using a second bit number calculated by the same calculation method as the first bit number, wherein the second bit number is the minimum bit number that can express the position information of the entry in use in the second table.

27. A data decompression device, characterized in that: Includes a decompressor that does the following: Upon receiving index data and a symbol indicating non-compression transmitted from a compression device, registering the symbol in a second table having the same data structure as the first table of the compression device using the same method as the symbol registration method of the compression device, and outputting the symbol; and a process of reading and outputting the symbol registered in the entry in the second table indicated by the position information upon receiving the index data indicating the compression and the position information indicating the position of the entry in which the symbol is registered in the first table, The position information is expressed by a first digit, wherein the first digit is a minimum number of digits capable of expressing the position information of the entry in use in the first table, and the first digit is calculated based on information indicating the usage status of the plurality of entries in the first table when the compression device outputs the index data indicating the compression and the position information. When receiving the indicator data representing the uncompressed data and the symbol and logging the symbol in the second table, the decompressor extracts the position information from the bit stream sent from the compression device and input to the decompression device based on the information representing the usage status of the multiple entries of the second table and using a second bit number calculated by the same calculation method as the calculation method of the first bit number, wherein the second bit number is the minimum bit number that can express the position information of the entry in use in the second table.

28. A recording medium having a program recorded thereon, characterized in that: The program causes the computer to execute the following processing: Upon receiving index data and a symbol indicating non-compression transmitted from a compression device, registering the symbol in a second table having the same data structure as the first table of the compression device using the same method as the symbol registration method of the compression device, and outputting the symbol; and receiving compression indicator data and position information indicating the position of the entry in which the symbol is registered in the first table and whose size is changed according to the use status of the first table, reading and outputting the symbol registered in the entry in the second table indicated by the position information, The position information is expressed by a first digit, wherein the first digit is a minimum number of digits capable of expressing the position information of the entry in use in the first table, and the first digit is calculated based on information indicating the usage status of the plurality of entries in the first table when the compression device outputs the index data indicating the compression and the position information. When the indicator data representing the uncompressed data and the symbol are received and the symbol is logged in the second table, the position information is extracted from the bit stream sent from the compression device and input to the decompression device based on the information representing the usage status of the multiple entries of the second table and using a second bit number calculated by the same calculation method as the calculation method of the first bit number, wherein the second bit number is the minimum bit number that can express the position information of the entry in use in the second table.

Citation Information

Patent Citations

  • Data compressor and data decompressor

    JP2014236449A

  • Data compression / decompression system, data compression method and data decompression method, and data compressor and data decompressor

    JP2016184830A