The invention belongs to the field of
data compression, and particularly relates to a method for quickly realizing GZIP compression based on hardware and application thereof, and the method comprises the following steps: dividing a to-be-processed text into a plurality of
processing windows with the size of m bytes, carrying out parallel calculation on m character string hash values starting from each
byte in one
processing window, and taking the hash values as index addresses of a dictionary; storing the current to-be-processed character string into the dictionary, and reading the historical candidate character string to complete the initial matching of the character string; the read historical character string and the current character string to be processed are compared
byte by
byte to finish fine matching, and the matching length and the matching distance of each character string are obtained. A matching
pruning algorithm is introduced to eliminate matching overlapping of character strings in
parallel processing windows and between the windows, the dependency between algorithms is solved, and the data
parallel processing capacity is improved. According to the invention, a high-bandwidth full-pipeline extensible
lossless compression data path suitable for hardware is realized, and the size of a
processing window is dynamically adjusted according to the tradeoff among hardware resources,
throughput rate and compression rate.