CN202931289U - Hardware LZ 77 compression implement system - Google Patents

Hardware LZ 77 compression implement system Download PDF

Info

Publication number
CN202931289U
CN202931289U CN 201220598485 CN201220598485U CN202931289U CN 202931289 U CN202931289 U CN 202931289U CN 201220598485 CN201220598485 CN 201220598485 CN 201220598485 U CN201220598485 U CN 201220598485U CN 202931289 U CN202931289 U CN 202931289U
Authority
CN
China
Prior art keywords
data
module
compression
dictionary
data storage
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.)
Expired - Lifetime
Application number
CN 201220598485
Other languages
Chinese (zh)
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.)
WUXI XINXIANG ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
WUXI XINXIANG ELECTRONIC 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 WUXI XINXIANG ELECTRONIC TECHNOLOGY Co Ltd filed Critical WUXI XINXIANG ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN 201220598485 priority Critical patent/CN202931289U/en
Application granted granted Critical
Publication of CN202931289U publication Critical patent/CN202931289U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

The utility model discloses a hardware LZ 77 compression implement system, comprising a PCIE interface module, a data direct access module, a data packing unpacking module, a data write-in buffer memory module, a compression algorithm module, a dictionary module, a non fixed length code element splicing module and a data read-out buffer memory module. A hardware LZ 77 compression implement method comprises the steps of: 1, caching data to be compressed; 2, performing compressing and coding on character string data; 3, splicing non fixed length data; and 4, caching compressed data. The hardware LZ 77 compression implement system realizes LZ77 compression through a piece of hardware, can effectively raise efficiency of a LZ 77 compression algorithm and extricates a CPU from mass data compression.

Description

A kind of hardware LZ77 compression realizes system
Technical field
The utility model relates to data compression, particularly adopts the hardware LZ77 compression of ping-pong operation to realize system and its implementation.
Background technology
Along with the fast development of information and communication technology (ICT), the exchanges data amount increases day by day, and large-scale data are processed also become more numerous and diverse.Must effectively compress for huge data like this, can effectively reduce the memory space of data, rationally utilize to greatest extent limited data transfer bandwidth.In addition, the data after compression are the encryption to initial data to a certain extent, better protected data.
Data compression can be divided into two types, a kind of Lossless Compression that is called, and another kind is called lossy compression method.
Lossless Compression refers to use the data after compression to be reconstructed (perhaps be called reduction, decompress), and the data after reconstruct and original data are identical; Lossless Compression is used for requiring signal and the on all four occasion of primary signal of reconstruct.A very common example is the compression of disk file.According to present technical merit, lossless compression algorithm generally can be the data compression of ordinary file to original 1/2~1/4.Most of condensing routines use the LZ algorithm based on self-adapting dictionary to dwindle file." LZ " refers to utility model person Lempel and the Ziv of this algorithm, and " dictionary " refers to the method that data block is sorted out.
At present, the compression of the overwhelming majority still has software to realize, operation is processed in the compression of data to remain and is completed by central processing unit (CPU), when in the face of mass data processing, will inevitably take a large amount of cpu resources, make and carry out other operations become a difficult problem when carrying out data compression.In addition, Software Compression is a kind of operation in sequence, can't obtain high efficiency concurrent operation.
Therefore, how effectively to improve the efficient of compression algorithm, alleviate the subject matter that pressure that Data compression brings to CPU becomes existing Software Compression decompression technique.
The utility model content
A technical problem to be solved in the utility model is to provide a kind of hardware LZ77 compression and realizes system and method, can effectively improve the efficient of LZ77 compression algorithm, and CPU is freed from Data compression.
The utility model adopts following technical scheme for achieving the above object:
A kind of hardware LZ77 compresses and realizes it is characterized in that system, and this system comprises:
The PCIE interface module be used for to realize and the communicating by letter of host computer;
Data access directly module DMA is used for realizing the direct access of data;
Data packing parse module, the group bag to data when being used for realizing data communication is conciliate package operation;
Data write cache module, are used for buffer memory data to be compressed;
The compression algorithm module is used for realizing searching of repeat character string, calculates the matching length of repeat character string, carries out the LZ77 coding;
Dictionary module is used for storing historical character string;
Non-fixed length code element concatenation module is for random length code high speed being spliced into the data block of fixed length;
The data reading cache module is used for the data after buffer memory compresses.
It is further characterized in that, described data write cache module and comprise:
Two data storage devices as random access memory ram or pushup storage FIFO are used for storing data to be compressed;
MUX is used for selection and data to be compressed is stored in one of them data storage device of two data storage devices;
Realize by MUX and two data storage devices the ping-pong operation that data write.
Described compression algorithm module comprises:
Data are kept in module, are used for interim temporary a certain amount of data;
The dictionary read module is for generation of read control signal and the data that read in dictionary of dictionary;
The maximum length matching module is used for calculating the maximum repeat length when repeat character string occurring;
The LZ77 coding module is used for treating packed data and encodes accordingly;
The dictionary updating module is for generation of the write control signal of dictionary and the data in the renewal dictionary.
Hardware LZ77 according to claim 1 compresses and realizes it is characterized in that system, and described dictionary module comprises:
The Hash table module is used for storing up-to-date historical dictionary information;
Dictionary chained list module, the historical dictionary information that is used for storing other;
The index initialization module is used for initialization Hash table module;
The chained list initialization module is used for initialization dictionary chained list module.
Described non-fixed length code element concatenation module comprises:
Non-fixed length code element is used for random length data encoding is spliced into the data of fixed length to fixed length code element modular converter;
The file size computing module is used for the data amount check after the calculation document compression, and with compression before the file data number relatively;
Compact model is selected module, according to before compressing file and the data amount check after compression how much choose compact model;
The direct memory module of data is used for when the direct store compressed pattern of data selection the operation to data.
Described data reading cache module comprises:
Two data storage devices as random access memory ram or pushup storage FIFO are for the data after store compressed;
The data writing MUX, the data after being used for selecting to compress write one of them data storage device of two data storage devices;
The sense data MUX be used for to select to read the data in one of them data storage devices of two data storage devices.
Further, the Hash table module of above-mentioned dictionary module comprises:
Two data storage devices as random access memory ram or Content Addressable Memory CAM are used for storing up-to-date historical dictionary information;
Write MUX, be used for the up-to-date historical dictionary information of one of them data storage device stores of two data storage devices of choice for use;
Read MUX, be used for to select to read the dictionary information in one of them data storage devices of two data storage devices;
The initialization MUX, for a data storage device selecting two data storage devices of initialization, alternately two data storage devices of initialization, improve the efficient of compression.
The dictionary chained list module of above-mentioned dictionary module comprises:
Two data storage devices as random access memory ram or Content Addressable Memory CAM, the historical dictionary information that is used for storing other;
Write MUX, be used for the up-to-date historical dictionary information of one of them data storage device stores of two data storage devices of choice for use;
Read MUX, be used for to select to read the dictionary information in one of them data storage devices of two data storage devices;
The initialization MUX, for a data storage device selecting two data storage devices of initialization, alternately two data storage devices of initialization, improve the efficient of compression.
The non-fixed length code element of above-mentioned non-fixed length code element concatenation module comprises to fixed length code element modular converter:
Non-fixed length code element is spliced into shorter fixed-length data module, is used for the non-block code of compression algorithm module output is spliced into shorter fixed-length data;
Be spliced into than the long data module than short data, be used for being spliced into long data with what non-fixed length code element was spliced into shorter fixed-length data module output than short data, be spliced into the parallel running of shorter fixed-length data module with non-fixed length code element, accelerated the process of splicing.
A kind of hardware LZ77 compression implementation method comprises the steps:
(1) buffer memory data to be compressed;
(2) string data is carried out compressed encoding;
(3) splice random length data;
(4) data after the buffer memory compression.
It is further characterized in that, described step (1) buffer memory data to be compressed are used MUX to control data to be compressed and stored in two data storage devices.
Described step (2) is carried out compression encoding process to string data and is comprised:
During packed data, get a certain amount of data and carry out hash conversion, search in Hash table, if do not find, a certain amount of data of getting are fresh characters, with the non-block code of fresh character coding output, if find, a certain amount of data of getting are repeat character string, seek maximum matching length as data head, with the non-block code of repeat character (RPT) string encoding output;
In compression process, the signal according to Hash table and dictionary chained list feedback carries out corresponding read operation to data to be compressed, and the data in Hash table and dictionary chained list are upgraded accordingly;
Alternately initialization and two Hash tables of use and two dictionary chained lists in compression process.
The random length data procedures of splicing of described step (3) comprising:
Utilize shift register that random length data are spliced into fixed-length data;
Calculate the data amount check after compressing, compare with data amount check before compression, choose suitable compact model, if the data amount check after compression is more than the front data amount check of compression, choose the mode of direct storage, read from buffer memory data to be compressed, if the data amount check before the no more than compression of data amount check after compression is chosen the mode of compression storage;
Add the data block head after compressing;
Data trailer after compression is carried out byte-aligned to be processed;
Process with the packed data parallel work-flow, improved the efficient of compression.
Data procedures after the compression of described step (4) buffer memory comprises:
Use the data writing MUX, the data after selection will be compressed write one of them data storage device in two data storage devices;
If a data block has been completed compression, utilize the sense data MUX, select to read the data in corresponding data storage device.
The utility model is realized the LZ77 compression by a kind of hardware, can effectively improve the efficient of LZ77 compression algorithm, and CPU is freed from Data compression.
Description of drawings
The hardware LZ77 compression that Fig. 1 provides for the utility model realizes the structural representation of system;
The hardware LZ77 compression that Fig. 2 provides for the utility model realizes the structural representation of an embodiment of system;
The hardware LZ77 compression that Fig. 3 provides for the utility model realizes that data in a concrete embodiment of system write the structural representation of the embodiment of cache module;
The hardware LZ77 compression that Fig. 4 provides for the utility model realizes the structural representation of another embodiment of system;
The hardware LZ77 compression that Fig. 5 provides for the utility model realizes the structural representation of the embodiment of compression algorithm module in a concrete embodiment of system;
The hardware LZ77 compression that Fig. 6 provides for the utility model realizes the structural representation of another embodiment of system;
The hardware LZ77 compression that Fig. 7 provides for the utility model realizes the structural representation of the embodiment of dictionary module in a concrete embodiment of system;
The hardware LZ77 compression that Fig. 8 provides for the utility model realizes the structural representation of another embodiment of system;
Fig. 9 is the structural representation that hardware LZ77 compression that the utility model provides realizes the embodiment of non-fixed length code element concatenation module in a concrete embodiment of system;
The hardware LZ77 compression that Figure 10 provides for the utility model realizes the structural representation of another embodiment of system;
The hardware LZ77 compression that Figure 11 provides for the utility model realizes the embodiment structural representation of data reading cache module in a concrete embodiment of system;
The hardware LZ77 compression that Figure 12 provides for the utility model realizes the structural representation of another embodiment of system;
The hardware LZ77 compression that Figure 13 provides for the utility model realizes the structural representation of the embodiment of Hash table module in a concrete embodiment of system or dictionary chained list module;
The hardware LZ77 compression that Figure 14 provides for the utility model realizes the structural representation of another embodiment of system;
The hardware LZ77 compression that Figure 15 provides for the utility model realizes that in a concrete embodiment of system, non-fixed length code element is to the structural representation of the embodiment of fixed length code element modular converter;
The hardware LZ77 that Figure 16 provides for the utility model compresses the flow chart of implementation method;
The hardware LZ77 that Figure 17 provides for the utility model compresses the flow chart of another embodiment of implementation method;
The hardware LZ77 that Figure 18 provides for the utility model compresses the flow chart of another embodiment of implementation method;
The hardware LZ77 that Figure 19 provides for the utility model compresses the flow chart of another embodiment of implementation method;
The hardware LZ77 that Figure 20 provides for the utility model compresses the flow chart of another embodiment of implementation method;
The hardware LZ77 that Figure 21 provides for bold and unrestrained name compresses the flow chart of a concrete application example of implementation method,
Embodiment
With an exemplary embodiment of the present utility model, the utility model is carried out careful description and explanation comprehensively with reference to the accompanying drawings.
The hardware LZ77 compression that Fig. 1 provides for the utility model realizes the structural representation of system.
As shown in Figure 1, hardware LZ77 compression realizes that system 100 comprises: PCIE interface module 101, data access directly module DMA102, data packing parse module 103, data write cache module 104, compression algorithm module 105, dictionary module 106, non-fixed length code element concatenation module 107, data reading cache module 108.
Wherein, PCIE interface module 101 be used for to realize and the communicating by letter of host computer.For example, the register that host computer PCI allocation E is corresponding realizes that host computer and hardware LZ77 compression realizes communicating by letter of inter-system data.
Data access directly module DMA102 is used for realizing the direct access of data.For example, according to address and the data length of host computer configuration, from the data of the address read fetching measured length of appointment, perhaps think to write in the address of appointment the data of designated length from disk or data storage device.
Data packing parse module 103, the group bag to packet when being used for realizing data communication is conciliate package operation.For example, during from the host computer reading out data, analytical propagation to data write the packet of cache module, remove data packet head, packet tail and data check information; During to the host computer data writing, the data that read are added data packet head, packet tail and check information from the data reading cache module.
Data write cache module 104, are used for buffer memory data to be compressed.For example, write data to be compressed from the interface of module, write cache module 104 through data, can read data to be compressed with ping-pong, reduce reading the time of data to be compressed.
Compression algorithm module 105 is used for realizing searching of repeat character string, calculates the matching length of repeat character string, carries out the LZ77 coding.For example, read a certain amount of string data that gets from data cache module 104, character string is carried out hash conversion, search from dictionary module 106, whether ask for string data according to the feedback signal judgement of dictionary module 106 is repeat character string, if seek maximum matching length and coding output, if not, with the output of fresh character coding; Simultaneously, according to the feedback signal of dictionary module 106, reading out data to obtain maximum matching length, perhaps writes up-to-date dictionary information in dictionary module 106 from dictionary module 106, completes the renewal of data in dictionary module 106.
Dictionary module 106 is used for storing historical character string.For example, a certain amount of string data can produce corresponding control signal, and carry out data communication between dictionary module 106 through after compression algorithm module 105, and up-to-date dictionary information is stored in dictionary module 106.
Non-fixed length code element concatenation module 107 is used for the data block with random length code high speed splicing Cheng Dingchang.For example, become random length LZ77 coding after a certain amount of string data process compression algorithm module 105, non-fixed length code element concatenation module 107 can be spliced into these random length LZ77 code high speed the data of fixed length.
Data reading cache module 108 is used for the data after buffer memory compresses.For example, a data block has been completed data compression, utilize the sense data MUX, the data in corresponding data storage device are read in selection, simultaneously, utilize the data writing MUX, the data after selection will be compressed are written in the another one data storage device, utilize two storage devices alternately implementing reading and writing read the ping-pong operation of packed data.
The hardware LZ77 compression that Fig. 2 provides for the utility model realizes the structural representation of an embodiment of system.
as shown in Figure 2, hardware LZ77 compression realizes that system 200 comprises: PCIE interface module 201, data access directly module (DMA) 202, data packing parse module 203, data write cache module 204, compression algorithm module 205, dictionary module 206, non-fixed length code element concatenation module 207, data reading cache module 208, wherein the PCIE interface module 201, data access directly module (DMA) 202, data packing parse module 203, compression algorithm module 205, dictionary module 206, non-fixed length code element concatenation module 207, data reading cache module 208 can be respectively and the PCIE interface module 101 shown in Fig. 1, data access directly module (DMA) 102, data packing parse module 103, compression algorithm module 105, dictionary module 106, non-fixed length code element concatenation module 107, data reading cache module 108 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in Figure 2, data write cache module 204 and further comprise: data storage device 2041, data storage device 2042 and MUX 2043.
Wherein, data storage device 2041 and data storage device 2042 are used for storing data to be compressed.For example, can adopt the known data storage device of these professional recognitions such as random-access memory (ram) or pushup storage (FIFO) to realize, the data width of data storage device (Width) and data depth (Depth) can configure according to data demand.
MUX 2043, the data after being used for selecting to compress write one of them data storage device of two data storage devices.For example, in the data writing storage device 2041 and data storage device 2042 that data is replaced by MUX 2043, with the ping-pong operation of realizing that data write.
The hardware LZ77 compression that Fig. 3 provides for the utility model realizes that data in a concrete embodiment of system write the embodiment structural representation of cache module.
As shown in Figure 3, data write buffer memory 300 modules and comprise: data storage device 301, data storage device 302 and MUX 303.concrete being operating as in embodiment, after the initialization of hardware LZ77 compressibility, system will begin to write cache module 300 interfaces to data and write data to be compressed, select data to be compressed are written in two data storage devices one by MUX (MUX) 303, when a data storage device data write full, simultaneously another data storage device is when data have been read sky, write new data to be compressed in another data storage device, alternate cycles data writing in two data storage devices so, with the ping-pong operation of realizing that data write, till this process will last till the whole end of transmissions of all data blocks.
As seen, write by data the height continuity that buffer memory 300 can realize that data write from above-mentioned narration, improved in the efficient of data compression hour hands to the data read operation.
The hardware LZ77 compression that Fig. 4 provides for the utility model realizes the structural representation of another embodiment of system.
as shown in Figure 4, hardware LZ77 compression realizes that system 400 comprises: PCIE interface module 401, data access directly module (DMA) 402, data packing parse module 403, data write cache module 404, compression algorithm module 405, dictionary module 406, non-fixed length code element concatenation module 407, data reading cache module 408, wherein the PCIE interface module 401, data access directly module (DMA) 402, data packing parse module 403, data write cache module 404, dictionary module 406, non-fixed length code element concatenation module 407, data reading cache module 408 can be respectively and the PCIE interface module 101 shown in Fig. 1, data access directly module (DMA) 102, data packing parse module 103, data write cache module 104, dictionary module 106, non-fixed length code element concatenation module 107, data reading cache module 108 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in Figure 4, compression algorithm module 405 further comprises: data are kept in module 4051, dictionary read module 4052, maximum length matching module 4053, LZ77 coding module 4054 and dictionary updating module 4055.
Wherein, data are kept in module 4051, are used for interim temporary a certain amount of data.For example, the data that read m Byte are temporarily stored in the temporary module 4051 of data, are convenient to the efficient hash conversion of compression algorithm module 405.
Dictionary read module 4052 is for generation of read control signal and the data that read in dictionary of dictionary.For example, after data in the temporary module 4051 of data are carried out hash conversion, produce corresponding control signal and address signal, read the information of assigned address in dictionary, judge according to the feedback information of dictionary whether the data in the temporary module 4051 of data are repeat character string, if compress processing; If not, do not compress processing.
Maximum length matching module 4053 is used for calculating the maximum repeat length when character string occurring.For example, " ab " and " abcde " arranged in the data of having compressed, data to be compressed are " abcde ", can calculate the maximum repeat length of repeat character string by the maximum length matching module, have improved to a certain extent the performance of compression.
LZ77 coding module 4054 is used for data to be compressed are encoded accordingly.For example, when dictionary read module 4052 feedback signal decision data are repeat character string, simultaneously calculated maximum matching length by maximum length matching module 4053, LZ77 coding module 4054 coded systems corresponding to use repeat character string are encoded and are substituted original data; When dictionary read module 4052 feedback signal decision data were fresh character, the coding that LZ77 coding module 4054 use fresh characters are corresponding replaced original data.
Dictionary updating module 4055 is for generation of the write control signal of dictionary and the data in the renewal dictionary.For example, when definite character is after fresh character or character string are repeat character string, need to be with the information updating of character or character string in dictionary, the dictionary updating module produces the write control signal of dictionary, the information of character or character string is write in the assigned address of corresponding dictionary.
The hardware LZ77 compression that Fig. 5 provides for the utility model realizes the structural representation of the embodiment of compression algorithm module in a concrete embodiment of system.
As shown in Figure 5, compression algorithm module 500 comprises: data are kept in module 501, dictionary read module 502, maximum length matching module 503, LZ77 coding module 504 and dictionary updating module 505.
a certain amount of data of storage in the temporary module 501 of data, after carrying out hash conversion by dictionary read module 502 for data wherein, produce corresponding control signal reading out data from dictionary, whether be repeat character string according to the signal determining data of dictionary feedback, if, start maximum length matching module 503, calculate the maximum repeat length of repeat character string, start LZ77 coding module 504 and carry out the repeat character (RPT) string encoding, if not, start LZ77 coding module 504 and carry out the fresh character coding, simultaneously, write the more new data of requirement in the dictionary according to the signal of dictionary feedback.
By above-mentioned as seen in compression algorithm module 500, to the read-write operation of data and frequent, the temporary module 501 of data has reduced the read-write operation of partial data on certain degree, improved the efficient of hash conversion, simultaneously compression algorithm module 500 be one comparatively independently module can with other module parallel running, therefore with the Function of data writing buffer memory 300 to a more satisfactory state.
The hardware LZ77 compression that Fig. 6 provides for the utility model realizes the structural representation of another embodiment of system.
as shown in Figure 6, hardware LZ77 compression realizes that system 600 comprises: PCIE interface module 601, data access directly module (DMA) 602, data packing parse module 603, data write cache module 604, compression algorithm module 605, dictionary module 606, non-fixed length code element concatenation module 607, data reading cache module 608, wherein the PCIE interface module 601, data access directly module (DMA) 602, data packing parse module 603, data write cache module 604, compression algorithm module 605, non-fixed length code element concatenation module 607, data reading cache module 608 can be respectively and the PCIE interface module 101 shown in Fig. 1, data access directly module (DMA) 102, data packing parse module 103, data write cache module 104, compression algorithm module 105, non-fixed length code element concatenation module 107, data reading cache module 108 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in Figure 6, dictionary module 606 further comprises: Hash table module 6061, dictionary chained list module 6062, index initialization module 6063 and chained list initialization module 6064.
Wherein, Hash table module 6061 is used for storing up-to-date historical dictionary information.For example, data that " ab " [1] was compressed before being, and " ab " [2] are just good data of compression, the information that Hash table module 6061 can up-to-date ab are the assigned address of information updating prescribed storage means in the Hash table module 6061 of " ab " [2].
Dictionary chained list module 6062, the historical dictionary information that is used for storing other.For example, the data that " ab " [1] was compressed before being, and " ab " [2] are the good data of just compression, the Hash table module 6061 i.e. information of " ab " [1] of information that can abandon older ab, this moment, the information of the ab that dictionary chained list module 6062 reception Hash table modules 6061 abandon was the information of " ab " [1], was stored to the assigned address of prescribed storage means in dictionary chained list module 6062.
Index initialization module 6063 is used for initialization Hash table module 6061.For example, when the compression of completing a data block, when needing another data block of compression, need to empty operation to Hash table, index initialization module 6063 empties initialization operation to Hash table module 6061 accordingly at this moment.
Chained list initialization module 6064 is used for initialization dictionary chained list module 6062.For example, when the compression of completing a data block, when needing another data block of compression, need to empty operation to the dictionary chained list, chained list initialization module 6064 empties initialization operation to dictionary chained list module 6062 accordingly at this moment.
The hardware LZ77 compression that Fig. 7 provides for the utility model realizes the structural representation of the embodiment of dictionary module in a concrete embodiment of system.
As shown in Figure 7, dictionary module 700 comprises: Hash table module 701, dictionary chained list module 702, index initialization module 703 and chained list initialization module 704.
During packed data, Hash table module 701 feedback data, fresh character or repeat character string when judging data to be compressed, in case after determining, Hash table module 701 receives up-to-date dictionary information, dictionary information that will be older abandons; Dictionary chained list module 702 receives the data that Hash table module 701 abandons, and with the historical dictionary information of its storage as other; When hardware LZ77 compressibility initialization or when completing a data block compression, index initialization module 703 and chained list initialization module 704 start, and the data in Hash table module 701 and dictionary chained list module 702 are emptied.
The hardware LZ77 compression that Fig. 8 provides for the utility model realizes the structural representation of another embodiment of system.
As shown in Figure 8, hardware LZ77 compression realizes that system 800 comprises: PCIE interface module 801, data access directly module (DMA) 802, data packing parse module 803, data write cache module 804, compression algorithm module 805, dictionary module 806, non-fixed length code element concatenation module 807, data reading cache module 808; Wherein PCIE interface module 801, data access directly module (DMA) 802, data packing parse module 803, data write cache module 804, compression algorithm module 805, dictionary module 806, data reading cache module 808 and can be respectively write cache module 104, compression algorithm module 105, dictionary module 106, data reading cache module 108 with the PCIE interface module 101 shown in Fig. 1, data access directly module (DMA) 102, data packing parse module 103, data and have identical structure, its concrete technology contents of no longer too much elaboration here.
As shown in Figure 8, non-fixed length code element concatenation module 800 further comprises: non-fixed length code element is selected module 8073 and the direct memory module 8074 of data to fixed length code element modular converter 8071, file size computing module 8072, compact model.
Wherein, non-fixed length code element is used for the data with random length data encoding splicing Cheng Dingchang to fixed length code element modular converter 8071.For example, random length data encoding A and B are arranged, wherein the A code length is 16, the B code length is 20, become data and the remaining coding of fixed length to fixed length code element modular converter 8071 through non-fixed length code element, the data of fixed length can be 8,32 or 64 etc., add data block head before the data block of while after compression, and polishing when the data block trail byte does not line up makes the data byte alignment.
File size computing module 8072 is used for the data amount check after the calculation document compression, and with compression before the file data number relatively.For example, the data amount check before the file data compression is 32K, and the data amount check after compression is 20K.Two above information are compared, feed back corresponding state and signal and select module 8073. to compact model
Compact model is selected module 8073, be used for according to before compressing file and the data amount check after compression how much choose compact model.For example, if the data amount check before data compression is 32K, the data amount check after compression is 20K, chooses the compression memory module; If the data amount check before compression is 1K, the data amount check after compression is 2K, chooses direct memory module.
The direct memory module 8074 of data, when being used for selecting direct store compressed mode compression data to the operation of data.For example, be 1K if get the data number before compression, the data amount check after compression is 2K, compact model selects module 8073 to select direct memory module, the direct memory module 8074 of data starts, and directly writes from data and reads corresponding data cache module, and add corresponding data block head.
The hardware LZ77 compression that Fig. 9 provides for the utility model realizes the structural representation of the embodiment of non-fixed length code element concatenation module in a concrete embodiment of system.
As shown in Figure 9, non-fixed length code element concatenation module 900 comprises: non-fixed length code element is selected module 903 and the direct memory module 904 of data to fixed length code element modular converter 901, file size computing module 902, compact model.
when having non-fixed length code element to input from the interface of non-fixed length code element concatenation module 900, non-fixed length code element to fixed length code element modular converter 901, non-fixed length code element is kept in and concatenation until export can form the fixed length code element time, file size computing module 902 calculates the number of the data after processing to fixed length code element modular converter 901 through non-fixed length code element simultaneously, and with the compression before data amount check compare, tell result compact model to select module 903, choose suitable compact model, if what compact model selection module 903 was chosen is direct memory module, the direct memory module 904 of log-on data.
By above-mentioned content as seen, be the pipeline organization of a parallel running fully between non-fixed length code element concatenation module 900 and compression algorithm module, accelerated so greatly the efficient of data compression.
The hardware LZ77 compression that Figure 10 provides for the utility model realizes the structural representation of another embodiment of system.
as shown in figure 10, hardware LZ77 compression realizes that system 1000 comprises: PCIE interface module 1001, data access directly module (DMA) 1002, data packing parse module 1003, data write cache module 1004, compression algorithm module 1005, dictionary module 1006, non-fixed length code element concatenation module 1007, data reading cache module 1008, wherein the PCIE interface module 1001, data access directly module (DMA) 1002, data packing parse module 1003, data write cache module 1004, compression algorithm module 1005, dictionary module 1006, non-fixed length code element concatenation module 1007 can be respectively and the PCIE interface module 101 shown in Fig. 1, data access directly module (DMA) 102, data packing parse module 103, data write cache module 104, compression algorithm module 105, dictionary module 106, non-fixed length code element concatenation module 107 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in figure 10, data reading cache module 1008 comprises: data storage device 10081, data storage device 10082, data writing MUX 10083 and sense data MUX 10084.
Wherein, data storage device 10081 and data storage device 10082 for the data after store compressed, can adopt the known storage device of these professional persons such as random-access memory (ram) or pushup storage (FIFO) to realize.
Data writing MUX 10083, the data after being used for selecting to compress write one of them data storage device of two data storage devices.For example, to deposit data after compression in data storage device 10081, signal and the data path between data writing MUX 10083 gated data interfaces and data storage device 10081, thus can write data after compression in the data storage device 10081.
Sense data MUX 10084 be used for to select to read the data in one of them data storage devices of two data storage devices.For example, the current data that writing in the data storage device 10081 after compression simultaneously, have the data reading signal to produce, with the data reading in data storage device 10082; If the same data that writing in the data storage device 10082 after compression simultaneously, have the data reading signal to produce, with the data reading in data storage device 10081.
The hardware LZ77 compression that Figure 11 provides for the utility model realizes the structural representation of the embodiment of data reading cache module in a concrete embodiment of system.
As shown in figure 11, data reading cache module 1100 comprises: data storage device 1101, data storage device 1102, write MUX 1103 and read MUX 1104.
When just when executing data compresses, select data storage devices 1101 or data storage device 1102 to be used for data after store compressed by writing MUX 1103, if there is the data reading signal to produce simultaneously, select the another one data storage device by reading MUX 1104, and read the data in this data storage device.for example, writing MUX 1103 selects data storage device 1101 for the data after store compressed, if there is this moment read output signal to produce, select data storage device 1102 by reading MUX 1104, and general's data reading wherein, data in data storage device 1102 are all read, wait is completed a data block and must be compressed, be when in data storage device, the data in 1101 have been ready to read, writing MUX 1103 transfers to select data storage 1102 for the data after store compressed, so repeatedly, realized the table tennis of data reading, efficient when having improved data reading.
By said process as seen, data reading cache module 1100 is also parallel running with compression algorithm module and non-fixed length code element concatenation module, and this has also accelerated the efficient of compression to a certain extent.
The hardware LZ77 compression that Figure 12 provides for the utility model realizes the structural representation of another embodiment of system.
as shown in figure 12, hardware LZ77 compression realizes that system 1200 comprises: PCIE interface module 1201, data access directly module (DMA) 1202, data packing parse module 1203, data write cache module 1204, compression algorithm module 1205, Hash table module 12061, dictionary chained list module 12062, index initialization module 12063, chained list initialization module 12064, non-fixed length code element concatenation module 1207, data reading cache module 1208, wherein the PCIE interface module 1201, data access directly module (DMA) 1202, data packing parse module 1203, data write cache module 1204, compression algorithm module 1205, index initialization module 12063, chained list initialization module 12064, non-fixed length code element concatenation module 1207, data reading cache module 1208 can be respectively and the PCIE interface module 601 shown in Fig. 6, data access directly module (DMA) 602, data packing parse module 603, data write cache module 604, compression algorithm module 605, index initialization module 6063, chained list initialization module 6064, non-fixed length code element concatenation module 607, data reading cache module 608 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in figure 12, Hash table module 12061 further comprises: data storage device 120611, data storage device 120612, MUX 120613 and initialization MUX 120614; Dictionary chained list module 12062 further comprises: data storage device 120621, data storage device 120622, MUX 120623 and initialization MUX 120624.
Wherein data storage device 120611 and data storage device 120612, be used for storing up-to-date historical dictionary information.Data storage device 120621 and data storage device 120622, other historical dictionary information that are used for storing dictionary.
MUX 120613 is for the up-to-date historical dictionary information of one of them data storage device stores of two data storage devices of choice for use; MUX 120623 is used for other the historical dictionary information of one of them data storage device stores of two data storage devices of choice for use.
Initialization multifinder 120614 is used for the data storage device that two data storage devices are initially changed in selection, and alternately two data storage devices of initialization, improve the efficient of compression; Same initialization MUX 120624 is also to play this effect.
The hardware LZ77 compression that Figure 13 provides for the utility model realizes the structural representation of the embodiment of Hash table module in a concrete embodiment of system or dictionary chained list module.
As shown in figure 13, Hash table module or dictionary chained list module 1300 comprise: data storage device 1301, data storage device 1302, MUX 1303 and initialization institute road selector 1304.
During packed data, MUX 1303 need to select data storage device 1301 or the data storage device 1302 of use, with the data storage device stores dictionary information of selecting, the MUX of initialization simultaneously 1304 selects another data storage device to empty operation to the dictionary information in the data storage device.
By above-mentioned process as seen, in the process of compression by being used alternatingly and initialization of two pairs of dictionary datas, the efficient of compression that added piece.
The hardware LZ77 compression that Figure 14 provides for the utility model realizes the structural representation of another embodiment of system.
as shown in figure 14, hardware LZ77 compression realizes that system 1400 comprises: PCIE interface module 1401, data access directly module (DMA) 1402, data packing parse module 1403, data write cache module 1404, compression algorithm module 1405, dictionary module 1406, non-fixed length code element to fixed length code element modular converter 14071, file size computing module 14072, compact model selection module 14073, the direct memory module 14074 of data, data reading cache module 1408, wherein the PCIE interface module 1401, data access directly module (DMA) 1402, data packing parse module 1403, data write cache module 1404, compression algorithm module 1405, dictionary module 1406, file size computing module 14072, compact model is selected module 14073, the direct memory module 14074 of data, data reading cache module 1408 can be respectively and the PCIE interface module 801 shown in Fig. 8, data access directly module (DMA) 802, data packing parse module 803, data write cache module 804, compression algorithm module 805, dictionary module 806, file size computing module 8072, compact model is selected module 8073, the direct memory module 8074 of data, , data reading cache module 808 has identical structure, here its concrete technology contents of no longer too much elaboration.
As shown in figure 14, non-fixed length code element further comprises to fixed length code element modular converter 14071: non-fixed length code element is spliced into shorter fixed-length data module 140711 and is spliced into than long data module 140712 than short data.
Wherein, non-fixed length code element is spliced into shorter fixed-length data module 140711, is used for the non-block code of compression algorithm module output is spliced into shorter fixed-length data.For example, have respectively in compression algorithm module output encoder: 1 bit, 3 bits, 5 bits, 7 bits, 16bit need to be spliced into these data the whole font data of 8 bits.
Be spliced into than long data module 140712 than short data, be spliced into long data for the shorter fixed-length data that non-fixed length code element is spliced into shorter fixed-length data module 140711 outputs.For example, the data of 8 bits are spliced into the data of 32 bits or 64 bits.
The hardware LZ77 compression that Figure 15 provides for the utility model realizes that in a concrete embodiment of system, non-fixed length code element is to the structural representation of the embodiment of fixed length code element modular converter.
As shown in figure 15, non-fixed length code element comprises to fixed length code element modular converter 1500: non-fixed length code element is spliced into shorter fixed-length data module 1501 and is spliced into than long data module 1502 than short data.
when carrying out non-fixed length code element to the splicing of fixed length code element, non-fixed-length data reaches non-fixed length code element to the Data Input Interface of fixed length code element modular converter 1500, first be spliced into shorter fixed-length data module 1501 by non-fixed length code element random length coding is spliced into shorter fixed-length data, have again to be spliced into than long data module 1502 than short data shorter fixed-length data is spliced into the long fixed-length data output that data transmission format requires that meets, in this process, the splicing of data is streamlineds, has the function of splicing at a high speed, meanwhile also reduced greatly the consumption of hardware resource.
The hardware LZ77 that Figure 16 provides for the utility model compresses the flow chart of implementation method.
The flow process 1600 of hardware LZ77 compression implementation method comprises as shown in figure 16: step 1601, step 1602, step 1603 and step 1604.
Wherein, step 1601, the data that buffer memory is to be compressed.For example, utilize MUX 303, data storage device 301 and data storage device 302 to realize the operation that data table tennis writes.
Step 1602 is encoded to string data.For example, fetch data from temporal data module 501 and send into dictionary and read and carry out hash conversion in mould 502, the feedback signal judgement fresh character that fetches data or repeat character string according to Hash table module 701, calculate the pointer of maximum matching length and maximum matched character string in conjunction with maximum length matching module 503 and dictionary chained list module 702 after, send into and carry out the non-block code output of LZ77 in LZ77 coding module 504; Simultaneously, the data message that dictionary updating module 505 will have been compressed is updated in Hash table module 701 and dictionary linked list data module 702.
Step 1603 is spliced random length data.For example, non-fixed-length data is delivered to non-fixed length code element and is spliced into the shorter fixed-length data module 1501 shorter fixed-length datas of output, again by the data length that is spliced into than short data than the 1502 output the transmission of data appointments of long data module, select data after module 903 and the direct memory module 904 of data are selected suitable compact model output squeezing in conjunction with file size computing module 902, compact model, simultaneously, add data block head information in data by file size computing module 902 after the compression, select module 903 that the data block tail is carried out byte-aligned by compact model and process.
Step 1604, the data after the buffer memory compression.For example, the data after compression are delivered to the sense data cache module, are stored in data storage device 1101 or data storage device 1102 by the data that write after MUX 1103 is selected to compress; Simultaneously, select the data reading after compression in data storage device 1101 or data storage device 1102 by reading MUX 1104.
The hardware LZ77 that Figure 17 provides for the utility model compresses the flow chart of another embodiment of implementation method.
As shown in figure 17, the flow process of hardware LZ77 compression implementation method comprises: step 17011, step 1702, step 1703 and step 1704, wherein step 1702, step 1703 and step 1704 are carried out identical or similar operation with step 1602, step 1603 and step 1604 shown in Figure 16 respectively, no longer carry out too much narration at this.
Step 17011, usage data MUX are selected data to be compressed are written in one of them data storage device in two data storage devices.For example, data have just begun compression, data multiplex selector 303 is written to data to be compressed in data storage device 301, by the time the data in data storage device 301 write when completing, data multiplex selector 303 is written to next data block to be compressed in data storage device 302, by the time the data in data storage device 302 write complete with data storage device 301 in data compression complete, MUX writes data in data storage device 301; Perhaps in compression process, just during the data to be compressed in packed data storage device 301, MUX 303 data block that the next one is to be compressed is written in data storage device 302, by the time the data in data storage device 302 write complete with data storage device 301 in data compression complete, MUX writes data in data storage device 301.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
The hardware LZ77 that Figure 18 provides for the utility model compresses the flow chart of another embodiment of implementation method.
As shown in figure 18, the flow process 1800 of hardware LZ77 compression implementation method comprises: step 1801, step 18021, step 18022, step 18023, step 1803 and step 1804, wherein step 1801, step 1803 and step 1804 respectively step 1601, step 1603 and the step 1604 in Figure 16 carry out identical or similar operation, no longer carry out too much narration at this.
Step 18021, during packed data, get a certain amount of data and carry out hash conversion, search in Hash table, if find, a certain amount of data of getting are fresh characters, with the non-block code of fresh character coding output, if find, repeat character string during a certain amount of data of getting, seek maximum matching length as data head, with the non-block code of repeat character (RPT) string encoding output.For example, fetch data from temporal data module 501 and send into dictionary and read and carry out hash conversion in mould 502, the feedback signal judgement fresh character that fetches data or repeat character string according to Hash table module 701, calculate the pointer of maximum matching length and maximum matched character string in conjunction with maximum length matching module 503 and dictionary chained list module 702 after, send into and carry out the non-block code output of LZ77 in LZ77 coding module 504.
Step 18022 in compression process, according to the feedback signal of Hash table and dictionary chained list, is carried out corresponding read operation to data to be compressed, and the data in Hash table and dictionary chained list are upgraded accordingly.For example, when determining that character is fresh character after the process hash conversion, dictionary updating module 505 is controlled in Hash table module 701 and dictionary chained list module 702 and is upgraded dictionary information; Again read a certain amount of data in conjunction with the temporary module 501 of data from data memory module 301 or data memory module 302 simultaneously.
Step 18023 in compression process, replaces initialization and uses two Hash tables and dictionary chained list.For example, MUX 1303 choice for use data storage device 1301 storage dictionary datas in Hash table module 701 or dictionary chained list module 702, index initialization module 703 and chained list initialization module 704 empty or initialization operation the data storage device 1302 in Hash table module 701 and dictionary chained list module 702 respectively; Complete when the data block compression, in the time of carrying out the compression of next data block, the initialization data storage device 1301, choose data storage device 1302 and are used for the dictionary storage.
Seen by said process, by alternately initialization and two Hash tables of use and dictionary chained list can realize that the ping-pong operation of dictionary uses, and has improved the efficient of compression.
A kind of hardware LZ77 that Figure 19 provides for the utility model compresses the flow chart of another embodiment of implementation method.
The flow process 1900 of hardware LZ77 compression implementation method comprises as shown in figure 19: step 1901, step 1902, step 19031, step 19032, step 19033, step 19034 and step 1904, wherein step 1901, step 1902 and step 1904 respectively with Figure 16 in step 1601, step 1602 and step 1604 carry out identical or similar operation, no longer carry out too much narration at this.
Step 19031 utilizes shift register random length data to be spliced into the data of fixed length.For example, random length data are sent into non-fixed length code element and are spliced into the data output that is spliced into 8 bits or 16 bits in shorter fixed-length data module 1501, then through being spliced into than short data than long data module 1502, shorter data are spliced into the longer fixed-length data that satisfies transfer of data requirement length.
Step 19032, calculate the data amount check after compressing, compare with data amount check before compression, choose suitable compact model, if the data amount check of the data amount check after compression before more than compression chosen direct storage mode, read from buffer memory data to be compressed, if the data format before the no more than compression of data amount check after compression is chosen the mode that compression is stored.For example, after calculating through file size computing module 902, data before compression are 1K, and the data after compression become 2K, and compact model selects module 903 to select the direct memory modules 904 of log-on data to write in data storage device 301 cache module or data storage device 302 directly reading out data from data; If but the data before compression are 32K, the data after compression are 20K, and compact model selects module 903 to select the compression memory module.
Step 19033 is added the data block head after compressing.By file size computing module 902, data head information is added on the foremost of the data block after compression.
Step 19034 is carried out byte-aligned to the data trailer after compression and is processed.For example, supposing that the discontented byte of last data of data after compression is " 11 ", select 903 pairs of data afterbodys of module to carry out byte alignment operation by compact model, is " 11001100 " with " 11 " polishing.
Above-mentioned process and the step 1602 in Figure 16 are executed in parallel, and as seen, such structure can improve the efficient of compression greatly.
The hardware LZ77 that Figure 20 provides for the utility model compresses the flow chart of another embodiment of implementation method.
As shown in figure 20, the flow process 2000 of hardware LZ77 compression implementation method comprises: step 2001, step 2002, step 2003, step 20041 and step 20042, wherein step 2001, step 2002 and step 2003 respectively with Figure 16 in step 1601, step 1602 and step 1603 carry out identical or similar operation, no longer carry out too much elaboration at this.
Step 20041 is used the data writing MUX, and the data after selecting to compress write one of them data storage device in two data storage devices.For example, during data compression, data after data writing MUX 1103 will be compressed are written in data storage device 1101, by the time the data in this data block are all compressed when completing, data writing MUX 1103 will be selected the storage of the data after data storage device 1102 is used for compressing, data if the while has read output signal to produce in read data memory 1101, by the time the data reading in data storage device 1101 is completed to compress with data block and is again completed, and the data after MUX will be compressed are written in data storage device 1101.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
Step 20042 when a data block has been completed compression, is utilized and is read MUX, selects to read the data in corresponding data storage device.For example, during data compression, when having read output signal to produce, data storage device 1101 when being written into MUX 1103 and using, the data that sense data MUX 1104 is selected in reading out data storage devices 1102.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
The hardware LZ77 that Figure 21 provides for the utility model compresses the flow chart of a concrete application example of implementation method.
As shown in figure 21, the flow process 2100 of hardware LZ77 compression implementation method comprises: step 2101, step 2102, step 2103, step 2104, step 2105, step 2106, step 2107, step 2108, step 2109 and step 2010.
Step 2101, usage data MUX are selected data to be compressed are written in one of them data storage device in two data storage devices.For example, data have just begun compression, data multiplex selector 303 is written to data to be compressed in data storage device 301, by the time the data in data storage device 301 write when completing, data multiplex selector 303 is written to next data block to be compressed in data storage device 302, by the time the data in data storage device 302 write complete with data storage device 301 in data compression complete, MUX writes data in data storage device 301; Perhaps in compression process, just during the data to be compressed in packed data storage device 301, MUX 303 data block that the next one is to be compressed is written in data storage device 302, by the time the data in data storage device 302 write complete with data storage device 301 in data compression complete, MUX writes data in data storage device 301.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
Step 2102, during packed data, get a certain amount of data and carry out hash conversion, search in Hash table, if find, a certain amount of data of getting are fresh characters, with the non-block code of fresh character coding output, if find, repeat character string during a certain amount of data of getting, seek maximum matching length as data head, with the non-block code of repeat character (RPT) string encoding output.For example, fetch data from temporal data module 501 and send into dictionary and read and carry out hash conversion in mould 502, the feedback signal judgement fresh character that fetches data or repeat character string according to Hash table module 701, calculate the pointer of maximum matching length and maximum matched character string in conjunction with maximum length matching module 503 and dictionary chained list module 702 after, send into and carry out the non-block code output of LZ77 in LZ77 coding module 504.
Step 2103 in compression process, according to the feedback signal of Hash table and dictionary chained list, is carried out corresponding read operation to data to be compressed, and the data in Hash table and dictionary chained list are upgraded accordingly.For example, when determining that character is fresh character after the process hash conversion, dictionary updating module 505 is controlled in Hash table module 701 and dictionary chained list module 702 and is upgraded dictionary information; Again read a certain amount of data in conjunction with the temporary module 501 of data from data memory module 301 or data memory module 302 simultaneously.
Step 2104 in compression process, replaces initialization and uses two Hash tables and dictionary chained list.For example, MUX 1303 choice for use data storage device 1301 storage dictionary datas in Hash table module 701 or dictionary chained list module 702, index initialization module 703 and chained list initialization module 704 empty or initialization operation the data storage device 1302 in Hash table module 701 and dictionary chained list module 702 respectively; Complete when the data block compression, in the time of carrying out the compression of next data block, the initialization data storage device 1301, choose data storage device 1302 and are used for the dictionary storage.
Step 2105 utilizes shift register random length data to be spliced into the data of fixed length.For example, random length data are sent into non-fixed length code element and are spliced into the data output that is spliced into 8 bits or 16 bits in shorter fixed-length data module 1501, then through being spliced into than short data than long data module 1502, shorter data are spliced into the longer fixed-length data that satisfies transfer of data requirement length.
Step 2106, calculate the data amount check after compressing, compare with data amount check before compression, choose suitable compact model, if the data amount check of the data amount check after compression before more than compression chosen direct storage mode, read from buffer memory data to be compressed, if the data format before the no more than compression of data amount check after compression is chosen the mode that compression is stored.For example, after calculating through file size computing module 902, data before compression are 1K, and the data after compression become 2K, and compact model selects module 903 to select the direct memory modules 904 of log-on data to write in data storage device 301 cache module or data storage device 302 directly reading out data from data; If but the data before compression are 32K, the data after compression are 20K, and compact model selects module 903 to select the compression memory module.
Step 2107 is added the data block head after compressing.By file size computing module 902, data head information is added on the foremost of the data block after compression.
Step 2108 is carried out byte-aligned to the data trailer after compression and is processed.For example, supposing that the discontented byte of last data of data after compression is " 11 ", select 903 pairs of data afterbodys of module to carry out byte alignment operation by compact model, is " 11001100 " with " 11 " polishing.
Step 2109 is used the data writing MUX, and the data after selecting to compress write one of them data storage device in two data storage devices.For example, during data compression, data after data writing MUX 1103 will be compressed are written in data storage device 1101, by the time the data in this data block are all compressed when completing, data writing MUX 1103 will be selected the storage of the data after data storage device 1102 is used for compressing, data if the while has read output signal to produce in read data memory 1101, by the time the data reading in data storage device 1101 is completed to compress with data block and is again completed, and the data after MUX will be compressed are written in data storage device 1101.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
Step 2110 when a data block has been completed compression, is utilized and is read MUX, selects to read the data in corresponding data storage device.For example, during data compression, when having read output signal to produce, data storage device 1101 when being written into MUX 1103 and using, the data that sense data MUX 1104 is selected in reading out data storage devices 1102.So iterative cycles knows that data to be compressed all are transmitted, this process implementation the ping-pong operation of transfer of data, improved the efficient of compression.
With reference to above-mentioned the utility model exemplary description, those skilled in the art can understand and the utlity model has following several superiority:
The utility model provides hardware LZ77 compression to realize system and method, employing FPGA(Field Programmable Gate Arry) realize the LZ77 compression function, realize that by the method that adopts data to write cache module, data reading cache module number removes the ping-pong operation that writes and read, improved the efficient of LZ77 compression.
The utility model provides hardware LZ77 compression to realize system and method, adopts to be used alternatingly and initialization Hash table module and dictionary chained list module, has realized the parallel work-flow of dictionary initialization and compression, has improved to a certain extent the efficient of LZ77 compression.
The utility model provides hardware LZ77 compression to realize system and method, adopts LZ77 coding module and non-fixed length code element concatenation module to realize the parallel work-flow that LZ77 compressed encoding and non-fixed length code element are spliced at a high speed, has further promoted the efficient of LZ77 compression.
The utility model provides hardware LZ77 compression to realize system and method, adopt compact model to select module and the direct memory module of data to realize, data are directly stored and are compressed two kinds of patterns of storage, have guaranteed the compression ratio of LZ77 compression, have guaranteed the performance of compression.
Illustrate and describe although the utility model is specialized some specific examples herein, yet the utility model is not restricted to the details of institute's crucial point, because not departing from spirit of the present utility model and scope and equivalency range in claim, can make multiple improvement and structural change.Therefore, wide region and as illustrated in claim more in some sense the explanation consistent with scope of the present utility model additional what is claimed is suitable.

Claims (8)

1. a hardware LZ77 compression realizes it is characterized in that system, and this system comprises:
The PCIE interface module be used for to realize and the communicating by letter of host computer;
Data access directly module DMA is used for realizing the direct access of data;
Data packing parse module, the group bag to data when being used for realizing data communication is conciliate package operation;
Data write cache module, are used for buffer memory data to be compressed;
The compression algorithm module is used for realizing searching of repeat character string, calculates the matching length of repeat character string, carries out the LZ77 coding;
Dictionary module is used for storing historical character string;
Non-fixed length code element concatenation module is for random length code high speed being spliced into the data block of fixed length;
The data reading cache module is used for the data after buffer memory compresses.
2. hardware LZ77 compression according to claim 1 realizes it is characterized in that system, and described data write cache module and comprise:
Two data storage devices as random access memory ram or pushup storage FIFO are used for storing data to be compressed;
MUX is used for selection and data to be compressed is stored in one of them data storage device of two data storage devices.
3. hardware LZ77 compression according to claim 1 realizes it is characterized in that system, and described compression algorithm module comprises:
Data are kept in module, are used for interim temporary a certain amount of data;
The dictionary read module is for generation of read control signal and the data that read in dictionary of dictionary;
The maximum length matching module is used for calculating the maximum repeat length when repeat character string occurring;
The LZ77 coding module is used for treating packed data and encodes accordingly;
The dictionary updating module is for generation of the write control signal of dictionary and the data in the renewal dictionary.
4. hardware LZ77 compression according to claim 1 realizes it is characterized in that system, and described dictionary module comprises:
The Hash table module is used for storing up-to-date historical dictionary information;
Dictionary chained list module, the historical dictionary information that is used for storing other;
The index initialization module is used for initialization Hash table module;
The chained list initialization module is used for initialization dictionary chained list module.
5. hardware LZ77 compression according to claim 1 realizes it is characterized in that system, and described non-fixed length code element concatenation module comprises:
Non-fixed length code element is used for random length data encoding is spliced into the data of fixed length to fixed length code element modular converter;
The file size computing module is used for the data amount check after the calculation document compression, and with compression before the file data number relatively;
Compact model is selected module, is used for choosing compact model;
The direct memory module of data is used for when the direct store compressed pattern of data selection the operation to data.
6. hardware LZ77 compression according to claim 1 realizes it is characterized in that system, and described data reading cache module comprises:
Two data storage devices as random access memory ram or pushup storage FIFO are for the data after store compressed;
The data writing MUX, the data after being used for selecting to compress write one of them data storage device of two data storage devices;
The sense data MUX be used for to select to read the data in one of them data storage devices of two data storage devices.
7. hardware LZ77 compression according to claim 4 realizes it is characterized in that system, and described Hash table module comprises:
Two data storage devices as random access memory ram or Content Addressable Memory CAM are used for storing up-to-date historical dictionary information;
Write MUX, be used for the up-to-date historical dictionary information of one of them data storage device stores of two data storage devices of choice for use;
Read MUX, be used for to select to read the dictionary information in one of them data storage devices of two data storage devices;
The initialization MUX for a data storage device selecting two data storage devices of initialization, replaces two data storage devices of initialization;
Described dictionary chained list module comprises:
Two data storage devices as random access memory ram or Content Addressable Memory CAM, the historical dictionary information that is used for storing other;
Write MUX, be used for the up-to-date historical dictionary information of one of them data storage device stores of two data storage devices of choice for use;
Read MUX, be used for to select to read the dictionary information in one of them data storage devices of two data storage devices;
The initialization MUX, for a data storage device selecting two data storage devices of initialization, alternately two data storage devices of initialization, improve the efficient of compression.
8. hardware LZ77 compression according to claim 5 realizes it is characterized in that system, and described non-fixed length code element comprises to fixed length code element modular converter:
Non-fixed length code element is spliced into shorter fixed-length data module, is used for the non-block code of compression algorithm module output is spliced into shorter fixed-length data;
Be spliced into than the long data module than short data, be used for being spliced into long data with what non-fixed length code element was spliced into shorter fixed-length data module output than short data, be spliced into the parallel running of shorter fixed-length data module with non-fixed length code element.
CN 201220598485 2012-11-14 2012-11-14 Hardware LZ 77 compression implement system Expired - Lifetime CN202931289U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201220598485 CN202931289U (en) 2012-11-14 2012-11-14 Hardware LZ 77 compression implement system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201220598485 CN202931289U (en) 2012-11-14 2012-11-14 Hardware LZ 77 compression implement system

Publications (1)

Publication Number Publication Date
CN202931289U true CN202931289U (en) 2013-05-08

Family

ID=48221198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201220598485 Expired - Lifetime CN202931289U (en) 2012-11-14 2012-11-14 Hardware LZ 77 compression implement system

Country Status (1)

Country Link
CN (1) CN202931289U (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023509A (en) * 2012-11-14 2013-04-03 无锡芯响电子科技有限公司 Hardware LZ77 compression implementation system and implementation method thereof
CN104202054A (en) * 2014-09-16 2014-12-10 东南大学 Hardware LZMA (Lempel-Ziv-Markov chain-Algorithm) compression system and method
CN104749429A (en) * 2015-04-08 2015-07-01 四川拓普测控科技有限公司 Lightning overvoltage signal losslessly compressing and recording system
CN106021356A (en) * 2015-05-11 2016-10-12 上海兆芯集成电路有限公司 Hardware data compressor using dynamic hash algorithm based on input block type
CN108809320A (en) * 2017-04-28 2018-11-13 华为技术有限公司 A kind of data compression method, equipment and terminal based on LZ77
CN110233627A (en) * 2019-05-22 2019-09-13 深圳大学 A kind of system and method for the hardware-compressed based on continuous-flow type
CN116032292A (en) * 2023-03-27 2023-04-28 山东智慧译百信息技术有限公司 Efficient big data storage method based on translation file
CN117119120A (en) * 2023-10-25 2023-11-24 上海伯镭智能科技有限公司 Cooperative control method based on multiple unmanned mine cars

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023509A (en) * 2012-11-14 2013-04-03 无锡芯响电子科技有限公司 Hardware LZ77 compression implementation system and implementation method thereof
CN104202054A (en) * 2014-09-16 2014-12-10 东南大学 Hardware LZMA (Lempel-Ziv-Markov chain-Algorithm) compression system and method
CN104749429A (en) * 2015-04-08 2015-07-01 四川拓普测控科技有限公司 Lightning overvoltage signal losslessly compressing and recording system
CN106021356A (en) * 2015-05-11 2016-10-12 上海兆芯集成电路有限公司 Hardware data compressor using dynamic hash algorithm based on input block type
CN106021356B (en) * 2015-05-11 2019-07-16 上海兆芯集成电路有限公司 The hardware data compression device of dynamic hash algorithm is used according to input block type
CN108809320A (en) * 2017-04-28 2018-11-13 华为技术有限公司 A kind of data compression method, equipment and terminal based on LZ77
CN108809320B (en) * 2017-04-28 2021-05-18 华为技术有限公司 LZ 77-based data compression method, equipment and terminal
CN110233627A (en) * 2019-05-22 2019-09-13 深圳大学 A kind of system and method for the hardware-compressed based on continuous-flow type
CN116032292A (en) * 2023-03-27 2023-04-28 山东智慧译百信息技术有限公司 Efficient big data storage method based on translation file
CN117119120A (en) * 2023-10-25 2023-11-24 上海伯镭智能科技有限公司 Cooperative control method based on multiple unmanned mine cars
CN117119120B (en) * 2023-10-25 2023-12-22 上海伯镭智能科技有限公司 Cooperative control method based on multiple unmanned mine cars

Similar Documents

Publication Publication Date Title
CN202931289U (en) Hardware LZ 77 compression implement system
CN103023509A (en) Hardware LZ77 compression implementation system and implementation method thereof
CN103095305A (en) System and method for hardware LZ77 compression implementation
CN102457283B (en) A kind of data compression, decompression method and equipment
CN102970043B (en) A kind of compression hardware system based on GZIP and accelerated method thereof
CN102754078B (en) Enhanced multi-processor waveform data exchange using compression and decompression
JP5826114B2 (en) Data decompression device, data compression device, data decompression program, data compression program, and compressed data distribution system
CN102244518B (en) The hard-wired system and method for parallel decompression
CN103236847B (en) Based on the data lossless compression method of multilayer hash data structure and Run-Length Coding
CN104202054A (en) Hardware LZMA (Lempel-Ziv-Markov chain-Algorithm) compression system and method
EP4030628A1 (en) Near-storage acceleration of dictionary decoding
CN107027036A (en) A kind of FPGA isomeries accelerate decompression method, the apparatus and system of platform
US9479194B2 (en) Data compression apparatus and data decompression apparatus
CN107565971A (en) A kind of data compression method and device
CN108886367A (en) Method, apparatus and system for compression and decompression data
CN111723059B (en) Data compression method and device, terminal equipment and storage medium
CN101478311B (en) Hardware accelerated implementation process for bzip2 compression algorithm
CN108287877A (en) A kind of RIB renders compressed file FPGA compression/decompression compression systems and hardware decompressing method
CN103268299B (en) A kind of generic data compression IP kernel being applied to PXI Express bus testing system
CN113468090B (en) PCIe communication method and device, electronic equipment and readable storage medium
US6349150B1 (en) Predictive data compression system and methods
CN108932315A (en) A kind of method and relevant apparatus of data decompression
CN111832257B (en) Conditional transcoding of encoded data
US20210157485A1 (en) Pattern-based cache block compression
RU2450441C1 (en) Data compression method and apparatus

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: Room E701 No. 20 building science and Technology Park Liye sensor network university 214000 Jiangsu province Wuxi City District Qingyuan Road

Patentee after: WUXI XINXIANG ELECTRONIC TECHNOLOGY Co.,Ltd.

Address before: 214135 Jiangsu Province, Wuxi City District Qingyuan Road Branch Park 530 building A room 512

Patentee before: WUXI XINXIANG ELECTRONIC TECHNOLOGY Co.,Ltd.

CX01 Expiry of patent term

Granted publication date: 20130508

CX01 Expiry of patent term