The invention relates to the technical field of FPGA code
stream compression, in particular to an FPGA code
stream rapid
compression method and
system, which comprises the following steps: traversing a line number in a target multi-layer index structure, identifying a data
block group, a feature value group and the number of data blocks corresponding to the line number, judging whether the number of the data blocks is a preset number or not, if the number is the preset number, judging whether a subsequent single data
block group set exists or not, and if the number is the preset number, sending the subsequent single data
block group set to the target multi-layer index structure; if yes, merging the data block group with a subsequent single data block group to obtain a merged data block group, if not, taking the data block group as an
original data block group, if not, judging whether the same feature value exists in the feature value group, if yes, compressing the data block group to obtain a compressed data block group, and if not, taking the data block group as the
original data block group; and if not, taking the data block group as an
original data block group, and performing code
stream recombination on the merged data block group set, the compressed data block group set and the original data block group set. The problems that the overall compression effect of the FPGA code
stream data is poor, and more computing resources are occupied can be solved.