摘要 |
According to the present invention, there is provided a method for compressing each of a plurality of data packets to form a compressed packet for transmission by a communication device, the data packets being composed of a sequence of data elements and the data packets being stored on a first computer such that the method is performed by the first computer, the method comprising the steps of: (a) receiving one of the plurality of data packets designated as packet P?m?; (b) parsing the packet P?m? such that the sequence of data elements of the packet P?m? is parsed into a sequence of parsed elements, each of the parsed elements having a form selected from the group consisting of a character, a pair of offset and length components, and a run length encoding consisting of a repetition factor component and a character component, and each of parsed elements and each of the comonents of the parsed elements having a frequency of occurrence; (c) selecting an encoding table from a historical array, the historical array including at least one encoding table from compresssion of at least previously compressed data packet, the encoding table having been constructed according to the frequencies of occurrence of a plurality of parsed elements of the at least one previously compressed data packet, independent of data from the packet P?m?; (d) encoding the sequence of parsed elements according to the encoding table to form encoded data; (e) packaging the encoded data in to the compressed packet; (f) constructing a historical frequency list of the frequencies of occurrence of the parsed elements; (g) constructing an additional encoding table according to the frequencies of occurence of the parsed elements; and (h) storing the additional encoding table in the historical array. |