CN111384965B - Data compression/decompression device and data decompression method - Google Patents

Data compression/decompression device and data decompression method Download PDF

Info

Publication number
CN111384965B
CN111384965B CN201811628245.3A CN201811628245A CN111384965B CN 111384965 B CN111384965 B CN 111384965B CN 201811628245 A CN201811628245 A CN 201811628245A CN 111384965 B CN111384965 B CN 111384965B
Authority
CN
China
Prior art keywords
data
decompressed
decompression
write
compressed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811628245.3A
Other languages
Chinese (zh)
Other versions
CN111384965A (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Cambricon Information Technology Co Ltd
Original Assignee
Shanghai Cambricon Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Cambricon Information Technology Co Ltd filed Critical Shanghai Cambricon Information Technology Co Ltd
Priority to CN201811628245.3A priority Critical patent/CN111384965B/en
Priority to PCT/CN2019/121056 priority patent/WO2020114283A1/en
Publication of CN111384965A publication Critical patent/CN111384965A/en
Application granted granted Critical
Publication of CN111384965B publication Critical patent/CN111384965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/4006Conversion to or from arithmetic code
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/55Compression Theory, e.g. compression of random number, repeated compression
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/60General implementation details not specific to a particular type of compression
    • H03M7/6011Encoder aspects

Abstract

The application relates to a data compression and decompression device and a data decompression method, wherein a control circuit of the device obtains a decompression control command according to the starting address and the length of compressed data in data to be decompressed, and then decompresses the compressed data of the read data to be decompressed based on the decompression control command.

Description

Data compression/decompression device and data decompression method
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data compression/decompression apparatus and a data decompression method.
Background
Data decompression is the inverse process of data compression, and in the conventional technology, the data decompression process generally processes compressed data by selecting a proper coding algorithm so as to restore the compressed data to a state before compression.
However, the conventional data decompression method cannot decompress data to be calculated, which contains both compressed data and uncompressed data.
Disclosure of Invention
In view of the above, it is desirable to provide a data compression/decompression device and a data decompression method capable of compressing and decompressing data to be calculated including compressed data and uncompressed data.
A data compression and decompression device comprises a control circuit and a compression and decompression circuit, wherein the control circuit is connected with the compression and decompression circuit,
the control circuit is used for obtaining a decompression control command according to the initial address and the length of compressed data in data to be decompressed, wherein the data to be decompressed comprises compressed data and uncompressed data;
the compression and decompression circuit is used for decompressing the compressed data in the data to be decompressed according to the decompression control command.
As an optional implementation manner, the control circuit is further configured to obtain the read-write control command of each codec according to the number of codecs;
each of the decompression circuits is used for reading data to be decompressed from data to be operated according to the read-write control command, wherein the data to be operated comprises at least one data to be decompressed. 3. The apparatus according to claim 2, wherein the codec comprises a first read/write circuit, a first memory, and codec means, the first read/write circuit being connected to the control circuit and the first memory, and the codec means being connected to the control circuit and the first memory, respectively,
the first read-write circuit is used for reading data to be decompressed from the data to be operated according to the read-write control instruction and writing the data to be decompressed into the first memory;
the control circuit is further used for obtaining a decompression control instruction according to the start address and the data length of compressed data in the data to be decompressed stored in the first memory;
and the compression and decompression part is used for compressing the compressed data in the data to be decompressed according to the decompression control instruction.
In an optional embodiment, the apparatus further comprises a non-compressed data path coupled to the first memory and a second read/write circuit coupled to the control circuit and the first memory,
the control circuit is also used for obtaining a writing control instruction according to the non-compressed data of the data to be decompressed in the first memory;
the second read-write circuit is used for writing the uncompressed data out of the uncompressed data path according to the write-out control instruction.
In an optional embodiment, the apparatus further comprises a second memory, the second memory is respectively connected with the control circuit and the codec,
the second memory is used for storing the data to be operated, wherein the data to be operated comprises a head section and a data section, the head section comprises a plurality of data heads, the data section comprises a plurality of data bodies and uncompressed data, the data heads comprise corresponding data bodies or initial addresses and data lengths of the uncompressed data, and the data bodies comprise compressed coded data of corresponding data blocks.
As an optional implementation manner, the control circuit is specifically configured to obtain, according to a data header in current data to be decompressed, a start address and a data length of a data body and uncompressed data corresponding to the current data to be decompressed, obtain a decompression control command according to the start address and the data length of the data body in the current data to be decompressed, and obtain a write-out control command according to the start address and the data length of the uncompressed data in the current data to be decompressed;
the compression and decompression part is specifically used for decompressing the data body in the current data to be decompressed according to the decompression control command to obtain decompressed data.
As an optional implementation manner, the control circuit is further configured to obtain a direction parameter of a data write window corresponding to the current data to be decompressed, and obtain a write control command according to the direction parameter;
the second read-write circuit is further configured to write decompressed data of a data volume in the current data to be decompressed into a storage space corresponding to the data write window on a second memory according to the write-in control command, and write uncompressed data in the current data to be decompressed into the storage space corresponding to the data write window through an uncompressed data channel.
A method of data decompression, the method comprising:
obtaining a decompression control command according to the initial address and the length of compressed data in data to be decompressed, wherein the data to be decompressed comprises compressed data and uncompressed data;
and decompressing the compressed data in the data to be decompressed according to the decompression control command.
As an optional implementation, the method further comprises:
obtaining read-write control commands according to the number of the compression and decompression circuits;
and acquiring data to be decompressed from the data to be operated according to the read-write control command.
As an optional implementation, the method further comprises:
and after the data to be decompressed is read from the data to be operated, the data to be decompressed is written into a first memory of the compression and decompression circuit.
As an alternative embodiment, the method further comprises,
obtaining a writing control instruction according to the non-compressed data of the data to be decompressed;
and writing the uncompressed data out of the uncompressed data path according to the writing-out control instruction.
As an optional implementation, the method further comprises:
the method comprises the steps of obtaining data to be operated and storing the data to be operated to a second memory, wherein the data to be operated comprises a head section and a data section, the head section comprises a plurality of data heads, the data section comprises a plurality of data bodies and non-compressed data, the data heads comprise corresponding data bodies or initial addresses and data lengths of the non-compressed data, and the data bodies comprise compressed coded data of corresponding data blocks.
As an optional implementation manner, decompressing the compressed data in the data to be decompressed according to the decompression control command includes:
according to a data head in the current data to be decompressed, obtaining a starting address and a data length of a corresponding data body in the current data to be decompressed;
obtaining a decompression control command according to the initial address and the data length of the data body in the current data to be decompressed;
and decompressing the data body in the current data to be decompressed according to the decompression control command to obtain decompressed data.
As an optional implementation manner, obtaining a write-out control instruction according to uncompressed data of the data to be decompressed includes:
according to a data header in the current data to be decompressed, obtaining a start address and a data length of corresponding uncompressed data in the current data to be decompressed;
and obtaining a writing control command according to the initial address and the data length of the uncompressed data in the current data to be decompressed.
As an optional implementation manner, obtaining a direction parameter of a data write window corresponding to the current data to be decompressed, and obtaining a write-in control command according to the direction parameter;
and writing the decompressed data of the data body in the current data to be decompressed into a storage space corresponding to the data writing window on a second memory according to the writing control command, and writing the uncompressed data in the current data to be decompressed into the storage space corresponding to the data writing window through an uncompressed data channel.
In the data compression and decompression device and the data decompression method in the above embodiments, the control circuit obtains the decompression control command according to the start address and the length of the compressed data in the data to be decompressed, and then decompresses the compressed data in the read data to be decompressed based on the decompression control command.
Drawings
FIG. 1 is a block diagram of an embodiment of a data compression and decompression apparatus;
FIG. 2 is a block diagram showing the structure of a data compression/decompression apparatus according to an embodiment;
FIG. 3 is a block diagram showing the structure of a data compression/decompression apparatus according to an embodiment;
FIG. 4 is a block diagram showing the structure of a data compression/decompression apparatus according to an embodiment;
FIG. 5 is a block diagram of an embodiment of a data compression/decompression apparatus;
FIG. 6 is a flow diagram that illustrates the steps of a method for decompressing data, in one embodiment;
FIG. 7 is a flow diagram illustrating additional steps of a method for decompressing data, in accordance with an embodiment;
FIG. 8 is a flow diagram illustrating additional steps in a data decompression method, according to an embodiment;
FIG. 9 is a diagram illustrating the structure of data to be operated on in one embodiment;
FIG. 10 is a flowchart illustrating a step of decompressing compressed data in the current data to be decompressed according to an embodiment;
FIG. 11 is a flowchart illustrating the steps of decompressing uncompressed data in the current data to be decompressed according to an embodiment;
FIG. 12 is a flow diagram illustrating additional steps in a data decompression method, according to an embodiment;
fig. 13 is a schematic illustration of the decompression results obtained in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1 to fig. 5, a block diagram of a data compression and decompression apparatus 100 according to an embodiment of the present application is shown, where the data compression and decompression apparatus 100 includes: a control circuit 110 and a codec circuit 120. The control circuit 100 is connected to a codec circuit 120. Wherein the content of the first and second substances,
the control circuit 100 is configured to obtain a decompression control command according to a start address and a length of compressed data in data to be decompressed, where the data to be decompressed includes compressed data and uncompressed data. The decompression and compression circuit 120 is used for decompressing the compressed data in the data to be decompressed according to the decompression control command.
In the data compression and decompression device in this embodiment, the control circuit obtains the decompression control command according to the start address and the length of the compressed data in the data to be decompressed, and then decompresses the compressed data of the read data to be decompressed based on the decompression control command.
As an alternative embodiment, the number of the codec circuits 120 in the data codec device 100 may be multiple, and each codec circuit 120 is connected to the control circuit 110. The control circuit 110 sends the obtained decompression control instruction to each codec circuit 120, and each codec circuit 120 decompresses compressed data in the data to be decompressed in the received data to be operated according to the received decompression control instruction. The data to be decompressed received by each of the codec circuits 120 constitutes data to be operated. Further, the control circuit 110 can be used to obtain the read/write control command for each codec 120 according to the number of codecs.
Each codec circuit 120 may be further configured to read data to be decompressed from the data to be operated according to the read/write control instruction.
In the data compression and decompression device and the data decompression method in this embodiment, the read-write control command of each compression and decompression circuit is obtained according to the number of the compression and decompression circuits, and each compression and decompression circuit is used for reading data to be decompressed from data to be calculated according to the read-write control command, wherein the data to be calculated includes at least one data to be decompressed, and then each decompression circuit can process the data to be decompressed in parallel, so that the data processing efficiency is high.
Further, as shown in fig. 2, the codec circuit 120 may include: a first read-write circuit 121, a first memory 122 and a compression-decompression block 123. The first read/write circuit 121 is connected to the control circuit 110 and the first memory 122, and the codec unit 123 is connected to the control circuit 110 and the first memory 123, respectively.
The first read-write circuit 121 is configured to read data to be decompressed from data to be calculated, and write the data to be decompressed into the first memory 122; the control circuit 110 is further configured to obtain a decompression control instruction according to a start address and a data length of compressed data in the data to be decompressed stored in the first memory 122; the compression and decompression part 123 is configured to decompress the compressed data in the data to be decompressed according to the decompression control instruction.
In one embodiment, as shown in fig. 3-4, the data compression/decompression apparatus 100 further includes an uncompressed data path 130 and a second read/write circuit 140, wherein the uncompressed data path 130 is connected to the first memory 123. The second read/write circuit 140 is connected to the control circuit and the first memory.
Wherein the uncompressed data path 130 is used for transmission of said uncompressed data. Specifically, the second read/write circuit 140 writes out the uncompressed data in the data to be decompressed on the first memory from the uncompressed data path according to the write-out control instruction. Specifically, the control circuit 110 is further configured to obtain a write control instruction according to uncompressed data in the data to be decompressed; the second read/write circuit 140 is configured to write the uncompressed data out of the uncompressed data path according to the write-out control instruction. Alternatively, the individual codecs 120 may share the same uncompressed data path 130 (FIG. 3). Alternatively, each codec 120 may be provided with a separate uncompressed data path 130 (fig. 4).
Further, as shown in fig. 5, the data compression and decompression apparatus 100 further includes a second memory 150. The second memory 150 is connected to the second read/write circuit 140. The second memory 150 may be used to store data to be operated on. Optionally, the data to be operated on includes a header section and a data section, the header section includes a plurality of data headers, the data section includes a plurality of data volumes and uncompressed data, the data headers include start addresses and data lengths of the corresponding data volumes or uncompressed data, and the data volumes include compressed encoded data of corresponding data blocks.
Optionally, the second memory 150 may also be connected to the second read/write circuit 140 and the codec 123. The second memory can also be used for storing uncompressed data in the data to be decompressed written by the second read-write circuit 140 through the uncompressed data path 130 and decompressed data output by the compression and decompression part 123. Optionally, the second memory 150 decompresses the data according to a preset format as well as the uncompressed data. Optionally, the preset format may be set according to a storage format of the data to be operated before compression.
In one embodiment, when the data to be calculated includes a header segment and a data segment, the control circuit 110 is specifically configured to obtain, according to a data header in the data to be decompressed, a start address and a data length of a corresponding data body and non-compressed data in the data to be decompressed, obtain a decompression control command according to the start address and the data length of the data body in the data to be decompressed, and obtain a write-out control command according to the start address and the data length of the non-compressed data in the data to be decompressed. The decompression and compression component 123 is specifically configured to decompress the data volume in the current data to be decompressed according to the decompression control command, so as to obtain decompressed data.
Further, the control circuit 110 is further configured to obtain a direction parameter of a data writing window corresponding to the current data to be decompressed, and obtain a writing control command according to the direction parameter. The direction parameter is related to the size and position of the data unit in the input data read by each codec. Wherein, the input data is compressed non-uniformly to obtain the data to be operated. The complete data block contained in the data unit is data to be compressed, and the non-complete data block is non-compressed data. Specific ways in which the input data is compressed non-uniformly may include: firstly, the control circuit 110 determines the size of the data unit according to the number of the compression/decompression circuits 120, determines a data reading window according to the size of the data unit, and obtains a read-write control instruction according to the data reading window; the codec circuit 120 reads data units from the input data according to the read/write control command. Then, the control circuit 100 obtains a compression control command according to the start address and the data length of the data to be compressed in the data unit, where the input data includes at least one data unit, and the data unit includes the data to be compressed and the non-compressed data. The codec circuit 120 obtains the data to be compressed according to the compression control instruction, and compresses the data to be compressed to obtain compressed data, where the compressed data is stored in a preset storage space of the second memory. Finally, the control circuit 110 is further configured to obtain a write control instruction according to the uncompressed data in the data unit; the second read/write circuit 140 is configured to write the uncompressed data out from the uncompressed data path to a preset storage space of the second memory according to the write-out control instruction. The data of the preset storage space on the second memory is the data to be operated.
Specifically, the second read/write circuit 140 is further configured to write, according to the write control command, decompressed data of a data body in the current data to be decompressed into a storage space corresponding to the data write window on the second memory, and write, through a non-compressed data channel, non-compressed data in the current data to be decompressed into the storage space corresponding to the data write window. It should be clear that the data read window is consistent with the direction parameters used by the corresponding data write window.
Based on the same inventive concept, as shown in fig. 6, the present application further proposes a data decompression method, where the data decompression method is executed by the data compression/decompression apparatus 100 in the foregoing embodiment, and specifically includes the following steps:
step S610, obtaining a decompression control command according to a start address and a length of compressed data in data to be decompressed, where the data to be decompressed includes compressed data and uncompressed data.
Specifically, the control circuit 110 obtains the decompression control command according to the start address and the length of the compressed data in the data to be decompressed, where the data to be decompressed includes the compressed data and the uncompressed data.
And S620, decompressing the compressed data in the data to be decompressed according to the decompression control command.
Specifically, the decompression and compression circuit 120 decompresses the compressed data in the data to be decompressed according to the decompression control command. Alternatively, when the codec compresses data to be compressed, the data compression algorithm used may be Huffman coding, run-length coding, LZ77, any combination thereof, and the like. It should be clear that the decompression algorithm selected by the codec circuit 120 is required to correspond to the compression algorithm used to obtain the data to be operated, for example, the Huffman algorithm is used to compress the input data to obtain the data to be operated, and then the corresponding Huffman algorithm is also required to be used when decompressing the data to be operated obtained by the Huffman algorithm, in the process, the input data is compressed to obtain the data to be operated, and the process is inverse to the process of decompressing the data to be operated to obtain the decompressed data.
In one embodiment, as shown in fig. 7, the data compression method further includes:
step S630, obtaining the read/write control command according to the number of the codec.
Specifically, the control circuit 110 obtains the read/write control command according to the number of the codec circuits. Further, generally, the control circuit distributes the data to be compressed obtained by the same codec in the data to be operated to a codec for decompression. Namely, several compressing and decompressing circuits are used for data compression to obtain data to be operated, and the same number of compressing and decompressing circuits are needed when the data to be operated are decompressed.
And step S640, acquiring data to be decompressed from the data to be operated according to the read-write control command.
Specifically, the first read/write circuit 121 of the codec circuit 120 obtains the data to be decompressed from the data to be operated according to the read/write control command. Further, the first read/write circuit 121 writes the data to be decompressed into the first memory 122 of the compression/decompression circuit after reading the data to be decompressed.
In one optional embodiment, as shown in fig. 8, the data compression method further includes:
and step S650, obtaining a writing control instruction according to the non-compressed data of the data to be decompressed.
The uncompressed data is data which does not need to be decompressed in the data to be operated. Specifically, the control circuit 110 obtains a write-out control instruction according to the uncompressed data of the data to be decompressed.
And step S660, writing the uncompressed data out of the uncompressed data path according to the writing control instruction.
Specifically, the second read/write circuit writes the uncompressed data out of the uncompressed data path according to the write-out control instruction. Optionally, uncompressed data is written out to the second memory 150.
In one embodiment, the data decompression method may further include: the method includes the steps of obtaining data to be operated, and storing the data to be operated to a second memory, wherein the data to be operated has a structure shown in fig. 9 and includes a header section (head) and a data section (data), the header section includes a plurality of data headers, the data section includes a plurality of data volumes and uncompressed data, the data headers include start addresses and data lengths of corresponding data volumes or uncompressed data, and the data volumes include compressed encoded data of corresponding data blocks. Wherein, the head A comprises a head 0 and a data head of uncompressed data in the data unit A; the head B comprises a head 2 and a data head of uncompressed data in the data unit B; the head C comprises a head 6 and a data head of uncompressed data in the data unit C; head D contains head 8 and a header of uncompressed data in data unit D.
Specifically, the first read/write circuit 121 of the codec circuit 120 obtains data to be operated, and stores the data to be operated in the second memory, where the data to be operated includes a header section and a data section, the header section includes a plurality of data headers, the data section includes a plurality of data volumes and uncompressed data, the data headers include start addresses and data lengths of corresponding data volumes or uncompressed data, and the data volumes include compressed encoded data of corresponding data blocks.
In one embodiment, as shown in fig. 10, if the data header and the data body of the data to be operated in the first memory are, the step S620 includes:
step S621, according to the data header in the current data to be decompressed, obtaining the initial address and the data length of the corresponding data body in the current data to be decompressed; and obtaining a decompression control command according to the initial address and the data length of the data body in the current data to be decompressed.
Specifically, the control circuit 110 obtains the start address and the data length of the corresponding data body in the current data to be decompressed according to the data header in the current data to be decompressed; and obtaining a decompression control command according to the initial address and the data length of the data body in the current data to be decompressed.
And step S622, decompressing the data body in the current data to be decompressed according to the decompression control command, so as to obtain decompressed data.
Specifically, the decompression and compression part 123 of the decompression and compression circuit 120 decompresses the data body in the current data to be decompressed according to the decompression control command, so as to obtain decompressed data.
Further, as shown in fig. 11, step S650 includes:
and S651, obtaining the initial address and the data length of the corresponding uncompressed data in the current data to be decompressed according to the data header in the current data to be decompressed.
Specifically, the control circuit 110 obtains the start address and the data length of the non-compressed data corresponding to the current data to be decompressed according to the data header in the current data to be decompressed.
And S652, obtaining a writing control command according to the initial address and the data length of the uncompressed data in the current data to be decompressed.
Specifically, the codec circuit 120 obtains a write-out control command according to the start address and the data length of the uncompressed data in the current data to be decompressed.
In one embodiment, as shown in fig. 12, the data decompression method further includes:
and S670, obtaining a direction parameter of a data writing window corresponding to the current data to be decompressed, and obtaining a writing control command according to the direction parameter.
Specifically, the control circuit 110 obtains a direction parameter of a data write window corresponding to the current data to be decompressed, and obtains a write control command according to the direction parameter. Optionally, the window parameter may include four direction parameters, for example, the parameters of each direction are set as: top, bottom, left, right. The four direction parameters are related to the size and position of the data unit in the input data read by each codec. Wherein, the input data is compressed non-uniformly to obtain the data to be operated. The complete data block contained in the data unit is data to be compressed, and the non-complete data block is non-compressed data.
For example, the window parameter of the data reading window of the codec reading data unit may be top-0, bottom-3, left-0, and right-30. The direction parameter of the data writing window may also be top-0, bottom-3, left-0, and right-30.
And S680, writing the decompressed data of the data body in the current data to be decompressed into a storage space corresponding to the data writing window on a second memory according to the writing control command, and writing the uncompressed data in the current data to be decompressed into the storage space corresponding to the data writing window through an uncompressed data channel.
Specifically, the second read-write circuit writes the decompressed data of the data body in the current data to be decompressed into a storage space corresponding to the data write window on the second memory according to the write-in control command, and writes the uncompressed data in the current data to be decompressed into the storage space corresponding to the data write window through an uncompressed data channel. As a result of the above example, the obtained decompression result obtained by writing the current data to be decompressed into the second memory is shown in fig. 13.
The data decompression method of this embodiment may decompress data to be calculated, which includes a header section and a data section, where the header section includes a plurality of data headers, the data section includes a plurality of data volumes and uncompressed data, the data headers include start addresses and data lengths of corresponding data volumes or uncompressed data, and the data volumes include compressed encoded data of corresponding data blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. The device is characterized by comprising a control circuit and a compression and decompression circuit, wherein the control circuit is connected with the compression and decompression circuit, the compression and decompression circuit comprises a first read-write circuit, a first memory and a compression and decompression part, the first read-write circuit is connected with the control circuit and the first memory, the compression and decompression part is respectively connected with the control circuit and the first memory, the device further comprises a non-compression data path and a second read-write circuit, the non-compression data path is connected with the first memory, and the second read-write circuit is connected with the control circuit and the first memory;
the first read-write circuit is used for reading data to be decompressed from data to be operated according to a read-write control instruction and writing the data to be decompressed into the first memory;
the control circuit is used for obtaining a decompression control command according to the starting address and the length of compressed data in the data to be decompressed stored in the first memory, wherein the data to be decompressed comprises compressed data and uncompressed data;
the compression and decompression part is used for decompressing compressed data in the data to be decompressed according to the decompression control command;
the control circuit is also used for obtaining a writing control instruction according to the non-compressed data of the data to be decompressed in the first memory; the second read-write circuit is used for writing the uncompressed data out of the uncompressed data path according to the write-out control instruction; the individual decompression circuits share the same uncompressed data path or the uncompressed data paths are independently provided for the individual decompression circuits.
2. The apparatus of claim 1,
the control circuit is also used for obtaining the read-write control instruction of each compression and decompression circuit according to the number of the compression and decompression circuits; the data to be operated comprises at least one data to be decompressed.
3. The apparatus according to claim 1, further comprising a second memory connected to the control circuit and the codec circuit, respectively,
the second memory is used for storing the data to be operated, wherein the data to be operated comprises a head section and a data section, the head section comprises a plurality of data heads, the data section comprises a plurality of data bodies and uncompressed data, the data heads comprise corresponding data bodies or initial addresses and data lengths of the uncompressed data, and the data bodies comprise compressed coded data of corresponding data blocks.
4. The apparatus of claim 3,
the control circuit is specifically used for obtaining a starting address and a data length of a corresponding data body and non-compressed data in the current data to be decompressed according to a data header in the current data to be decompressed, obtaining a decompression control command according to the starting address and the data length of the data body in the current data to be decompressed, and obtaining a writing control command according to the starting address and the data length of the non-compressed data in the current data to be decompressed;
the compression and decompression part is specifically used for decompressing the data body in the current data to be decompressed according to the decompression control command to obtain decompressed data.
5. The apparatus of claim 4,
the control circuit is also used for acquiring a direction parameter of a data writing window corresponding to the current data to be decompressed and obtaining a writing control command according to the direction parameter;
the second read-write circuit is further configured to write decompressed data of a data volume in the current data to be decompressed into a storage space corresponding to the data write window on a second memory according to the write-in control command, and write uncompressed data in the current data to be decompressed into the storage space corresponding to the data write window through an uncompressed data channel.
6. A method for data decompression, the method comprising:
reading data to be decompressed from data to be operated, and writing the data to be decompressed into a first memory of a compression and decompression circuit;
obtaining a decompression control command according to the initial address and the length of compressed data in the data to be decompressed stored in the first memory, wherein the data to be decompressed comprises compressed data and uncompressed data;
decompressing compressed data in the data to be decompressed according to the decompression control command;
obtaining a writing control instruction according to the non-compressed data of the data to be decompressed;
writing the uncompressed data out of an uncompressed data path according to the writing-out control instruction; the non-compressed data path is a shared path arranged for writing out non-compressed data in a plurality of data to be decompressed, or the non-compressed data path is a path arranged for writing out non-compressed data of one data to be decompressed in a plurality of data to be decompressed.
7. The method of claim 6, further comprising:
obtaining read-write control instructions according to the number of the compression and decompression circuits;
and acquiring the data to be decompressed from the data to be operated according to the read-write control instruction.
8. The method of claim 6, further comprising:
the method comprises the steps of obtaining data to be operated and storing the data to be operated to a second memory, wherein the data to be operated comprises a head section and a data section, the head section comprises a plurality of data heads, the data section comprises a plurality of data bodies and non-compressed data, the data heads comprise corresponding data bodies or initial addresses and data lengths of the non-compressed data, and the data bodies comprise compressed coded data of corresponding data blocks.
9. The method according to claim 8, wherein decompressing the compressed data in the data to be decompressed according to the decompression control command comprises:
according to a data header in the current data to be decompressed, obtaining the initial address and the data length of a corresponding data body in the current data to be decompressed;
obtaining a decompression control command according to the initial address and the data length of the data body in the current data to be decompressed;
and decompressing the data body in the current data to be decompressed according to the decompression control command to obtain decompressed data.
10. The method according to claim 9, wherein deriving a write-out control command according to uncompressed data of the data to be decompressed comprises:
according to a data head in the current data to be decompressed, obtaining a start address and a data length of corresponding uncompressed data in the current data to be decompressed;
and obtaining a writing control command according to the initial address and the data length of the uncompressed data in the current data to be decompressed.
11. The method of claim 10, further comprising:
acquiring a direction parameter of a data write-in window corresponding to the current data to be decompressed, and obtaining a write-in control command according to the direction parameter;
and writing the decompressed data of the data body in the current data to be decompressed into a storage space corresponding to the data writing window on a second memory according to the writing control command, and writing the uncompressed data in the current data to be decompressed into the storage space corresponding to the data writing window through an uncompressed data channel.
CN201811628245.3A 2018-12-07 2018-12-28 Data compression/decompression device and data decompression method Active CN111384965B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811628245.3A CN111384965B (en) 2018-12-28 2018-12-28 Data compression/decompression device and data decompression method
PCT/CN2019/121056 WO2020114283A1 (en) 2018-12-07 2019-11-26 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811628245.3A CN111384965B (en) 2018-12-28 2018-12-28 Data compression/decompression device and data decompression method

Publications (2)

Publication Number Publication Date
CN111384965A CN111384965A (en) 2020-07-07
CN111384965B true CN111384965B (en) 2022-06-17

Family

ID=71218199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811628245.3A Active CN111384965B (en) 2018-12-07 2018-12-28 Data compression/decompression device and data decompression method

Country Status (1)

Country Link
CN (1) CN111384965B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6414610B1 (en) * 1997-02-24 2002-07-02 Rodney J Smith Data compression
CN102236543A (en) * 2010-05-07 2011-11-09 百度在线网络技术(北京)有限公司 Data decompression device and method
CN102457283A (en) * 2010-10-28 2012-05-16 阿里巴巴集团控股有限公司 Data compression and decompression method and equipment
CN103516369A (en) * 2013-06-20 2014-01-15 易乐天 Method and system for self-adaptation data compression and decompression and storage device
CN107919872A (en) * 2016-10-07 2018-04-17 株式会社东芝 Data compression device, data decompressor and data compression decompression device
CN108292222A (en) * 2015-12-26 2018-07-17 英特尔公司 Hardware device and method for data decompression

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6392567B2 (en) * 2000-03-31 2002-05-21 Fijitsu Limited Apparatus for repeatedly compressing a data string and a method thereof
EP1225704A1 (en) * 2001-01-12 2002-07-24 STMicroelectronics S.r.l. "A process and system for compressing and decompressing digital information and computer program product therefor
CN101582067A (en) * 2008-05-15 2009-11-18 国际商业机器公司 Method and system for reducing storage requirements during decompressing compressed file
TWI522910B (en) * 2013-10-18 2016-02-21 威盛電子股份有限公司 Microprocessor, methods of selectively decompressing microcode, generating selectively compressed microcode, and generating a description, and computer program product
KR102078853B1 (en) * 2013-11-27 2020-02-18 삼성전자 주식회사 Memory system, host system and method for performing write operation in memory system
CN107526743B (en) * 2016-06-21 2020-08-07 伊姆西Ip控股有限责任公司 Method and apparatus for compressing file system metadata

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6414610B1 (en) * 1997-02-24 2002-07-02 Rodney J Smith Data compression
CN102236543A (en) * 2010-05-07 2011-11-09 百度在线网络技术(北京)有限公司 Data decompression device and method
CN102457283A (en) * 2010-10-28 2012-05-16 阿里巴巴集团控股有限公司 Data compression and decompression method and equipment
CN103516369A (en) * 2013-06-20 2014-01-15 易乐天 Method and system for self-adaptation data compression and decompression and storage device
CN108292222A (en) * 2015-12-26 2018-07-17 英特尔公司 Hardware device and method for data decompression
CN107919872A (en) * 2016-10-07 2018-04-17 株式会社东芝 Data compression device, data decompressor and data compression decompression device

Also Published As

Publication number Publication date
CN111384965A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
US9767529B1 (en) Method and apparatus for accessing compressed data and/or uncompressed data of image frame in frame buffer
US9720821B2 (en) Adaptive compression data storing method for non-volatile memories and system using the same
CN107632776B (en) Data storage device for compressing input data
KR960032912A (en) Data compression apparatus and method for indexed color image data
US11513783B2 (en) Control apparatus, program update system, and program update method
JPH06152435A (en) Expanding device and compressing/expanding device for variable length code
US10686468B2 (en) Data processing apparatus, memory system, and method of processing data
US11048622B2 (en) Memory system
US20170070244A1 (en) Storage control device, storage system, and storage control method
CN110419036B (en) Data compression method and device and computing device
CN111384961B (en) Data compression and decompression device and data compression method
US20180039426A1 (en) Data compression using partial statistics
KR101224397B1 (en) Data File Compressing Apparatus and Method, Image Forming Apparatus
CN111384965B (en) Data compression/decompression device and data decompression method
CN102263946A (en) Techniques for storing and retrieving pixel data
US8515189B2 (en) Image compression method with fixed compression ratio, image decompression method, and electronic device thereof
CN106293542B (en) Method and device for decompressing file
US7439887B2 (en) Method and apparatus for GIF decompression using fixed-size codeword table
US10229063B2 (en) Semiconductor device, data processing system, and semiconductor device control method
US9008185B2 (en) Apparatus and method of lossless compression/restoration of selective image information
CN101996660B (en) Data compression/decompression method, data decompression method, and optical disc drive utilizing the method
JPH09247671A (en) Digital image decoder
US11824566B2 (en) Data decompression device, data compression device, and memory system
TWI565303B (en) Image processing system and image processing method
US20160320983A1 (en) Controller for nonvolatile semiconductor memory

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant