Data Compression Device, Data Decryption Device, Data Decryption Method, and Data Decryption Program
By reducing the sliding window size to 4 kilobytes and using a 12-bit discovery position, the data compression device addresses memory capacity challenges in microcontrollers, maintaining processing efficiency and reducing memory requirements.
Patent Information
- Application Number
- JP2021014285
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-01
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-02-01
AI Technical Summary
In microcontrollers used in embedded devices, it is challenging to secure the memory capacity required for a 64-kilobyte sliding window in LZ77-based data compression, leading to difficulties in adopting these algorithms due to reduced processing speed.
A data compression device that searches for matching character strings within a 4-kilobyte sliding window, using a 12-bit discovery position, and arranges the uncompressed string length, uncompressed string, match string length, and discovery position in specific orders within blocks to reduce memory requirements while maintaining processing efficiency.
This approach reduces the memory capacity required for data compression and decoding while minimizing the decrease in processing speed, making it suitable for microcontrollers with limited resources.
Smart Images

Figure 0007685843000001 
Figure 0007685843000002 
Figure 0007685843000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a data compression device, a data decoding device , D - Data decoding method law and and a data decoding program.
Background Art
[0002] Although many data compression algorithms are known, generally, a derivative algorithm of LZ77 published in 1977 is frequently used. As a derivative algorithm of LZ77, LZ4, which emerged in the 2010s and improves compression and decoding speeds by performing operations in units of 1 byte, is known, and various technologies related to LZ4 have also been proposed (for example, Patent Document 1).
[0003] In LZ77-based data compression, it is searched whether a byte sequence that matches the byte sequence from the current focus position exists in front of the current focus position. When a matching byte sequence is found, instead of outputting the byte sequence, a pair of (discovery position, length of the byte sequence) is output. Since the resources of a computer are limited, a limit is imposed on the above search range, and a range forward by a specified byte length from the current focus position is searched.
[0004] In LZ77-based data compression, this search range is called a sliding window, or simply a window. In LZ77-based data compression before LZ4, the size of the sliding window is merely a parameter of the algorithm and can be of any size. However, in LZ4, by limiting access to units of bytes, it is fixed at 64 kilobytes that can be expressed as a 2-byte integer. By setting the size of the sliding window to 64 kilobytes, the above "discovery position" can be output as a 2-byte integer.
Prior Art Documents
Patent Documents
[0005]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0006] However, in a microcontroller (hereinafter abbreviated as MCU) that is often used in embedded devices, it is difficult to secure a memory capacity of 64 kilobytes for a sliding window. On the other hand, in LZ77-based algorithms prior to LZ4, the memory capacity can be reduced by reducing the sliding window as needed. However, in LZ77-based algorithms prior to LZ4, operations in units of 1 bit are required, so the processing speed is significantly reduced in MCUs with low CPU performance, and there is a problem that it is difficult to adopt them.
[0007] The present disclosure has been made to solve the above problems, and a data compression device, a data decoding device, and a data decoding program capable of reducing the memory capacity required for data compression and decoding while suppressing as much as possible a decrease in processing speed during data decoding. , D - Data decoding method law and and a data decoding program.
Means for Solving the Problems
[0008] To achieve the above object, a data compression device according to the present disclosure searches whether a character string from the current focus position matches a character string that appeared previously within a predetermined range, and when a matching character string is found, obtains a discovery position indicating the position of the found character string and a matching character string length indicating the length of the matching character string, and an uncompressed string length indicating the length of the uncompressed character string, an uncompressed character string composed of uncompressed characters, the matching character string length, and the discovery position are , in the order of the uncompressed string length, the uncompressed string, the match string length, and the discovery position provided with data compression means for generating a block in which they are arranged. The discovery position is indicated by 12 bits 、 In the odd-numbered blocks generated by the data compression means, the uncompressed string length, the uncompressed string, the match string length, and the discovery position are arranged in the order of the uncompressed string length, the uncompressed string, the match string length, and the discovery position. In the even-numbered blocks generated by the data compression means, the discovery position, the uncompressed string length, the uncompressed string, and the match string length are arranged in the order of the discovery position, the uncompressed string length, the uncompressed string, and the match string length. .
Effects of the Invention
[0009] According to the present disclosure, it is possible to reduce the memory capacity required for data compression and decoding while suppressing as much as possible a decrease in the processing speed during data decoding.
Brief Description of the Drawings
[0010] [Figure 1] Block diagram showing the hardware configuration of the microcomputer in the embodiment [Figure 2] Diagram showing the functional configuration of the microcomputer in the embodiment [Figure 3] Diagram for explaining the conventional compression algorithm [Figure 4] Diagram for explaining the conventional compression algorithm [Figure 5] Diagram for explaining the conventional compression algorithm [Figure 6] Diagram showing the data sequence of the compressed block in the embodiment [Figure 7] Diagram for explaining the output of the discovery position in the odd-numbered block during compression in the embodiment [Figure 8] Diagram for explaining the acquisition of the uncompressed character string in the even-numbered block during decoding in the embodiment [Figure 9] Flowchart showing the procedure of the block generation process during data compression in the embodiment [Figure 10] Flowchart showing the procedure of the data decoding process in the embodiment [Figure 11] Diagram showing the data sequence of the compressed block in the modification of the embodiment
Embodiments for Carrying Out the Invention
[0011] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings.
[0012] FIG. 1 is a block diagram showing the hardware configuration of the microcomputer 1 in the embodiment of the present disclosure. The microcomputer 1 is an example of a data compression device according to the present disclosure and is also an example of a data decoding device according to the present disclosure.
[0013] The microcomputer 1 is, for example, a microcontroller built in an outdoor unit constituting an air conditioner and comprehensively controlling the outdoor unit. As shown in FIG. 1, the microcomputer 1 includes a CPU (Central Processing Unit) 10, a ROM (Read Only Memory) 11, a RAM (Random Access Memory) 12, an auxiliary storage device 13, and an input / output interface 14. These components are interconnected via a bus 15.
[0014] The CPU 10 comprehensively controls the microcomputer 1. Details of the functions of the microcomputer 1 realized by the CPU 10 will be described later. The ROM 11 stores a startup program and data used when the startup program is executed. The RAM 12 is used as a work area for the CPU 10.
[0015] The auxiliary storage device 13 is composed of a readable and writable non-volatile semiconductor memory or the like. The readable and writable non-volatile semiconductor memory is, for example, an EEPROM (Electrically Erasable Programmable Read-Only Memory), a flash memory, or the like. The auxiliary storage device 13 stores various programs including a program for air conditioning, firmware downloaded from an external device (not shown), and a program for transmitting and receiving data with the external device (hereinafter referred to as a data transmission / reception program), and data used when these programs are executed. The external device is an example of a data compression device according to the present disclosure and is also an example of a data decoding device according to the present disclosure.
[0016] The data transmission / reception program and the update program for updating the data transmission / reception program can both be downloaded from the above external device or other devices to the microcomputer 1, and can also be stored and distributed on a computer-readable recording medium such as a CD-ROM (Compact Disc Read Only Memory), DVD (Digital Versatile Disc), magneto-optical disk, USB (Universal Serial Bus) memory, HDD (Hard Disk Drive), SSD (Solid State Drive), memory card, etc.
[0017] The input / output interface 14 is an interface for communicating with other components provided in the outdoor unit. Other components include, for example, a compressor, an expansion valve, a four-way valve, a fan, various sensors (current sensor, temperature sensor, pressure sensor, frequency sensor, acceleration sensor, etc.), a communication circuit, etc.
[0018] As shown in FIG. 2, the microcomputer 1 functionally includes a data compression unit 100, a data transmission unit 101, a data reception unit 102, and a data decoding unit 103. These functional units are realized by the CPU 10 executing the above data transmission / reception program stored in the auxiliary storage device 13. The data transmission / reception program is an example of the data compression program according to the present disclosure and is also an example of the data decoding program.
[0019] The data compression unit 100 is an example of the data compression means according to the present disclosure and compresses data. Specifically, the data compression unit 100 compresses the operation state data to be transmitted to the above external device. The operation state data includes an operation mode, a set temperature, an air volume, detection results of various sensors, etc. The compression algorithm of the data compression unit 100 will be described later.
[0020] The data transmission unit 101 transmits the operation state data compressed by the data compression unit 100 to the above external device.
[0021] The data reception unit 102 receives data such as firmware transmitted from the above-described external device. The data decoding unit 103 decodes the data received by the data reception unit 102. The data decoding unit 103 is an example of the data decoding means according to the present disclosure. The decoding algorithm of the data decoding unit 103 will be described later.
[0022] Subsequently, the compression algorithm of the data compression unit 100 and the decoding algorithm of the data decoding unit 103 will be described. To facilitate the understanding of the features in the present disclosure, first, a conventional compression algorithm will be briefly described.
[0023] FIG. 3 shows a basic compressed data sequence in the LZ77 algorithm. In the LZ77 algorithm, within a slide window of a specified size, it is searched whether the byte sequence from the current focus position matches the byte sequence that has appeared previously. If no matching byte sequence is found, the data for 1 byte at the focus position is output as it is as an "uncompressed character", and the focus position is advanced by 1 byte.
[0024] On the other hand, if a byte sequence from the focus position is found, a pair of (discovery position, match string length) is output, and the focus position is advanced by the match string length (in other words, the number of matching characters).
[0025] By the way, when decoding the original data from the compressed data sequence as shown in FIG. 3, there is a problem that it cannot be determined whether the next data is an "uncompressed character" or a pair of (discovery position, match string length). Therefore, in Lempel-Ziv-Storer-Szymanski (hereinafter referred to as LZSS), as shown in FIG. 4, a 1-bit identification flag is added. If this identification flag is "0", the next data is determined to be an "uncompressed character", and if it is "1", the next data is determined to be a pair of (discovery position, match string length).
[0026] In LZSS, in order to output one byte of uncompressed text, a total of 9 bits are required, including a 1-bit identification flag. Therefore, in the worst case, the size of the compressed data may increase by 9 / 8 times. Generally, when simply referring to the LZ77 algorithm, it often refers to this LZSS algorithm. In LZSS, in principle, bit-level operations are required. By assuming bit-level operations, in LZSS, the size of the sliding window only needs to be a power of 2, and the number of bits of the "discovery position" can also be any number of bits.
[0027] Removing the 1-bit identification flag in the above LZSS and limiting it to byte-level access results in the LZ4 algorithm. In LZ4, in the data sequence of Figure 3, it is divided into blocks that end with a pair of (discovery position, match string length), and the length of the uncompressed string that is continuous within the block is added to the beginning of the block as the "uncompressed string length". Figure 5 shows the compressed data sequence in the LZ4 algorithm.
[0028] In LZ4, decoding is performed in block units. Each block starts with the "uncompressed string length" and there is no undetermined part. In LZ4, the "uncompressed string length", "discovery position", and "match string length" can all be decoded by byte-level reading. Therefore, the "discovery position" needs to be a 1-byte integer, 2-byte integer, 3-byte integer, etc., and the size of the sliding window also needs to be 256 bytes, 64 kilobytes, 16384 kilobytes, etc. respectively. In LZ77, it has been empirically found that when the size of the sliding window is 256 bytes, a sufficient compression effect cannot be obtained. In LZ4, the size of the sliding window is 64 kilobytes.
[0029] In the present disclosure, among the compressed data sequences, the "discovery position" is restricted to a 12-bit integer. The largest integer that can be represented by a 12-bit integer is 4095, and the size of the sliding window can be reduced to 4 kilobytes. When the size of the sliding window is 4 kilobytes, although the compression rate decreases compared to the case of 64 kilobytes, it has been empirically found that a sufficient compression effect can be obtained. Since a 12-bit integer is a multiple of 4 bits, in the reading of data, operations in nibble units are required, but they are more efficient than operations in 1-bit units.
[0030] FIG. 6 shows the data sequence of the compressed block by the data compression unit 100. As shown in FIG. 6, in the data sequence in the present embodiment, the pair of (discovery position, match string length) in the LZ4 data sequence shown in FIG. 5 is separated, and is used as the "match string length" and the "discovery position".
[0031] When the compressed data sequence is decoded by the data decoding unit 103, since the first block is aligned at the byte boundary, for the three items of "uncompressed string length", "uncompressed string", and "match string length", it is possible to read them in byte units as in the prior art.
[0032] FIG. 7 shows the output format of the "discovery position" for the remaining 12 bits. As shown in FIG. 7, the lower 8 bits of the 12 bits are output as 1 byte as they are, and the upper 4 bits of the 12 bits are output to the lower 4 bits of the next byte. The upper 4 bits of the byte are for the next block. When these two output bytes are read as a little-endian 2-byte integer, exactly the lower 12 bits become the "discovery position". Note that when the architecture of the CPU 10 of the microcomputer 1 is big-endian, it becomes the same format when byte swapping of the 2-byte integer is performed.
[0033] As a result of the above, in the second block, each item is arranged with a 4-bit shift. The "uncompressed string length" arranged at the beginning of the second block can be obtained by the method of constructing bytes from each nibble, that is, by bit operation, taking out the nibbles in one byte and combining them with the adjacent nibbles to reconstruct one byte. The method of obtaining the "uncompressed string" arranged thereafter will be described with reference to FIG. 8. In the example of FIG. 8, the uncompressed string is "A, B, C, D, …".
[0034] The lower 4 bits of the first "A" are obtained as a by-product when constructing the "uncompressed string length". Reading 4 bytes from the next byte as a little-endian 4-byte integer and performing a 4-bit left shift will align "B", "C", and "D" within the uncompressed string at the byte boundary.
[0035] By inserting the previously obtained lower 4 bits of "A" into the lower 4 bits of the 4-byte integer vacated as a result of the 4-bit left shift, "A" is also aligned at the byte boundary. If the 4-byte integer composed of the uncompressed string of "A, B, C, D" is output as a little-endian 4-byte integer, four uncompressed strings arranged in the normal order can be obtained. Note that when the architecture of the CPU 10 of the microcomputer 1 is big-endian, byte swapping is required when reading and outputting the 4-byte integer.
[0036] The next 4 bytes are processed in the same way, and the subsequent 4 bits in FIG. 8 are inserted into the lower 4 bits of the 4-byte integer vacated as a result of the 4-bit left shift. By repeating as necessary below, the entire uncompressed string can be obtained.
[0037] The subsequent "match string length" in the second block can be obtained by the method of constructing bytes from each nibble described above. When obtaining the last 12-bit "discovery position", there is no 4-bit shift, and the next third block is again aligned at the byte boundary.
[0038] That is, the blocks arranged in odd positions may perform the same processing as the first block described above, and the blocks arranged in even positions may perform the same processing as the second block described above, enabling efficient decoding of the compressed data in the present embodiment with a "discovery position" of 12 bits.
[0039] FIG. 9 is a flowchart showing the procedure of a block generation process, which is a generation process of one block, in the data compression process executed by the data compression unit 100.
[0040] (Step S101) The data compression unit 100 searches whether the character string from the current focus position matches the character string that appeared previously within a 4-kilobyte sliding window. If no matching character string is found (Step S101; NO), the process of the data compression unit 100 transitions to Step S102. On the other hand, if a matching character string is found (Step S101; YES), the process of the data compression unit 100 transitions to Step S103.
[0041] (Step S102) The data compression unit 100 acquires the 1-byte data at the focus position as an "uncompressed character" and advances the focus position by 1 byte. Thereafter, the process of the data compression unit 100 returns to Step S101.
[0042] (Step S103) The data compression unit 100 generates a block in which the uncompressed string length, the uncompressed string, the matching string length, and the discovery position indicated by 12 bits are sequentially arranged, and ends the block generation process.
[0043] FIG. 10 is a flowchart showing the procedure of the data decoding process executed by the data decoding unit 103.
[0044] (Step S201) The data decoding unit 103 determines whether the block to be decoded is an odd-numbered block. If the block is an odd-numbered block (step S201; YES), the process of the data decoding unit 103 transitions to step S202. On the other hand, if the block is not an odd-numbered block, that is, if it is an even-numbered block (step S201; NO), the process of the data decoding unit 103 transitions to step S203.
[0045] (Step S202) The data decoding unit 103 reads the data of each item in byte units from the block. After that, the process of the data decoding unit 103 transitions to step S204.
[0046] (Step S203) The data decoding unit 103 reads the data of each item by 4-bit operation from the block. After that, the process of the data decoding unit 103 transitions to step S204.
[0047] (Step S204) The data decoding unit 103 decodes the original data based on the read data. After that, the process of the data decoding unit 103 transitions to step S205.
[0048] (Step S205) The data decoding unit 103 determines whether there is a next block. If there is a next block (step S205; YES), the process of the data decoding unit 103 returns to step S201. On the other hand, if there is no next block (step S205; NO), the data decoding unit 103 ends the data decoding process.
[0049] As described above, according to the compression and decoding algorithm in the microcomputer 1 of the present embodiment, since the size of the sliding window is reduced to 4 kilobytes, it can be used even in a microcomputer with few memory resources such as the microcomputer 1 incorporated in an air conditioner.
[0050] In addition, as the size of the sliding window is reduced, the discovery position is output in 12 bits during compression, so 4 bits can be saved compared to the case of outputting in 2 bytes as in the prior art.
[0051] Also, during decoding, although data reading by bit operations is required, it only needs to be in units of 4 bits (nibbles). For decoding of odd blocks, since data of each item is read in byte units, even a CPU of a microcontroller with low processing power can execute data decoding processing at high speed.
[0052] Depending on the architecture of the CPU 10 of the microcontroller 1, there are cases where it is required to be aligned at a 2-byte boundary when reading and writing 2-byte integers, and aligned at a 4-byte boundary when reading and writing 4-byte integers. In this case, for example, it can be read 4 times one byte at a time to generate a 4-byte integer, and then the procedure shown in FIG. 8 described above can be executed. The same processing can be performed when reading the 2-byte integer in FIG. 7.
[0053] The present disclosure is not limited to the above-described embodiments, and various modifications can of course be made without departing from the gist of the present disclosure.
[0054] For example, as shown in FIG. 11, when compressing data by the data compression unit 100, in the odd-numbered blocks, similar to the above-described embodiment (see FIG. 6), a 12-bit "discovery position" may be arranged at the end of the block, and in the even-numbered blocks, a format in which the 12-bit "discovery position" is arranged at the head of the block may be used.
[0055] With the above format, immediately after decoding the odd-numbered blocks, the 12 bits of the even-numbered blocks appear. Therefore, if only the "discovery position" is read by nibble unit operations, the other items can be read at high speed in byte units.
[0056] In the compression algorithm of the above-described embodiment (similarly to the conventional LZ4), it is necessary to accumulate uncompressed characters in memory until a matching character string is found. In the case of a personal computer or the like with abundant memory resources (for example, the external device in the embodiment), if necessary, it is possible to reallocate the memory for accumulating uncompressed characters. However, when performing compression on a microcomputer with limited memory resources, since it is difficult to reallocate memory, it is common to allocate in advance a memory for accumulating uncompressed characters with a fixed size.
[0057] Hereinafter, in the microcomputer 1, when a memory for accumulating uncompressed characters is allocated with a fixed size, the case where a matching character string is not found and the length of the accumulated uncompressed characters reaches the upper limit of the memory for accumulation will be described. In this case, the data compression unit 100 outputs the length of the accumulated uncompressed characters (that is, the size of the memory for accumulation) as the "uncompressed character string length" in FIG. 6. At this time, the data compression unit 100 sets the "matching character string length" to 0 and does not output the 12-bit "discovery position".
[0058] When the data decompression unit 103 discovers a block in which the above-described "discovery position" does not exist during data decompression, in the subsequent block, since there is no 4-bit shift caused by the 12-bit discovery position, the data of each item may be read and decompressed in the same procedure as the data reading of the previous block.
[0059] That is, when the "discovery position" does not exist in the odd-numbered block in the above-described embodiment, the data decompression unit 103 may continue to read the data of each item in the data reading procedure of the odd-numbered block for the subsequent block. Similarly, when the "discovery position" does not exist in the even-numbered block in the above-described embodiment, the data decompression unit 103 may continue to read the data of each item in the data reading procedure of the even-numbered block for the subsequent block.
[0060] Alternatively, when the start of a block aligns with a byte boundary, the data decoding unit 103 reads the data of each item according to the data reading procedure of the odd-numbered blocks in the above embodiment. When the start of a block does not align with a byte boundary (i.e., there is a 4-bit shift in value), the data decoding unit 103 may read the data of each item according to the data reading procedure of the even-numbered blocks in the above embodiment.
[0061] Also, all or part of the functional units of the microcomputer 1 (see FIG. 2) may be implemented by dedicated hardware. Dedicated hardware includes, for example, a single circuit, a composite circuit, a programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof.
Explanation of Signs
[0062] 1 Microcomputer, 10 CPU, 11 ROM, 12 RAM, 13 Auxiliary storage device, 14 Input / output interface, 15 Bus, 100 Data compression unit, 101 Data transmission unit, 102 Data reception unit, 103 Data decoding unit
Claims
1. Search whether the character string from the current focus position matches the character string that appeared previously within a predetermined range. When a matching character string is found, obtain the discovery position indicating the position of the found character string and the matching string length indicating the length of the matching character string, and generate a block in which the uncompressed string length indicating the length of the uncompressed character string, the uncompressed character string composed of uncompressed characters, the matching string length, and the discovery position are arranged in the order of the uncompressed string length, the uncompressed character string, the matching string length, and the discovery position. The data compression means is provided, The discovery position is indicated by 12 bits, In the odd-numbered blocks generated by the data compression means, the uncompressed string length, the uncompressed character string, the matching string length, and the discovery position are arranged in the order of the uncompressed string length, the uncompressed character string, the matching string length, and the discovery position, In the even-numbered blocks generated by the data compression means, the discovery position, the uncompressed string length, the uncompressed character string, and the matching string length are arranged in the order of the discovery position, the uncompressed string length, the uncompressed character string, and the matching string length. A data compression device.
2. Search whether the character string from the current focus position matches the character string that appeared previously within a predetermined range. When a matching character string is found, obtain the discovery position indicating the position of the found character string and the matching string length indicating the length of the matching character string, and generate a block in which the uncompressed string length indicating the length of the uncompressed character string, the uncompressed character string composed of uncompressed characters, the matching string length, and the discovery position are arranged in the order of the uncompressed string length, the uncompressed character string, the matching string length, and the discovery position. The data compression means is provided, The discovery position is indicated by 12 bits, When the length of the uncompressed character string reaches a predetermined upper limit, the data compression means generates a block in which the uncompressed string length, the uncompressed character string, and the matching string length are arranged in the order of the uncompressed string length, the uncompressed character string, and the matching string length. A data compression device.
3. A data decompression device that decompresses data compressed by a data compression device, which searches whether the character string from the current focus position matches a character string that appeared previously within a predetermined range, and when a matching character string is found, obtains a discovery position indicating the position of the found character string and a matching string length indicating the length of the matching character string, and generates a block in which an uncompressed string length indicating the length of the uncompressed character string, an uncompressed string composed of uncompressed characters, the matching string length, and the discovery position are arranged in this order of the uncompressed string length, the uncompressed string, the matching string length, and the discovery position, wherein the discovery position is indicated by 12 bits, For odd-numbered blocks, read the data of each item in byte units, For even-numbered blocks, read the data of each item by 4-bit operation, and includes data decompression means. A data decompression device.
4. A data decompression device that decompresses data compressed by the data compression device according to Claim 1, For the discovery position, read the data by 4-bit operation, For other items excluding the discovery position, read the data in byte units, and includes data decompression means. A data decompression device.
5. A data decompression device that decompresses data compressed by the data compression device according to Claim 2, When the start of the block aligns with the byte boundary, read the data of each item in byte units, When the start of the block does not align with the byte boundary, read the data of each item by 4-bit operation, and includes data decompression means. A data decompression device.
6. A data compression method that searches whether the character string from the current focus position matches a character string that appeared previously within a predetermined range, and when a matching character string is found, obtains a discovery position indicating the position of the found character string and a matching string length indicating the length of the matching character string, and generates a block in which an uncompressed string length indicating the length of the uncompressed character string, an uncompressed string composed of uncompressed characters, the matching string length, and the discovery position are arranged in this order of the uncompressed string length, the uncompressed string, the matching string length, and the discovery position, wherein the discovery position is indicated by 12 bits, when decompressing data compressed by the data compression method, For the odd-numbered blocks, read the data of each item in byte units, For the even-numbered blocks, a data decoding method of reading the data of each item by 4-bit operation.
7. A computer, searches whether the character string from the current focus position matches the character string that appeared previously within a predetermined range, and when a matching character string is found, obtains a discovery position indicating the position of the found character string and a matching string length indicating the length of the matching character string, and functions as data compression means for generating a block in which the uncompressed string length indicating the length of the uncompressed character string, the uncompressed character string composed of uncompressed characters, the matching string length, and the discovery position are arranged in this order. The discovery position is indicated by 12 bits. When decoding the data compressed by the computer, For the odd-numbered blocks, read the data of each item in byte units, For the even-numbered blocks, a data decoding program that functions as data decoding means for reading the data of each item by 4-bit operation.
Citation Information
Patent Citations
Data compression device and data restoration device
JP1995225667A
Compressing and expanding method for data file
JP1996079719A
Data compressor, data compression method and storage medium
JP2001094991A
Method and device for encoding / decoding numerical data string
JP2011114525A
Data compression device, data recovery device, data compression program, data recovery program, data compression method, and data recovery method
JP2019036810A