The application relates to the technical field of
data processing, and discloses a method and device for quickly reading MIR information of a gzip-compressed stdf file, which comprises the following steps: screening a stdf file
list, reading the front part of bytes, judging whether the file is a legal compressed file, decompressing the legal compressed file, judging whether the decompressed file is an illegal file, identifying MIR records and analyzing detailed contents if the file is not an illegal file, and judging whether the file is a target file that needs complete analysis according to the detailed contents. The application only needs to read part of the file information, then identify the compression
algorithm according to a characteristic code, decompress in the memory, and quickly analyze MIR information in the file header, so that the program version number is obtained, the time consumption of identification is reduced from the minute level to the
millisecond level, resource occupation is greatly reduced, and the
processing efficiency is effectively improved.