/Encoding Method And Apparatus, Decoding Method And Apparatus, Device, And Storage Medium
Abstract

An encoding method and apparatus, a decoding method and apparatus, a device, and a storage medium, related to the field of encoding and decoding technologies. In the encoding method, a data set is obtained, where the data set includes N pieces of data, and N is greater than or equal to 2. If an occurrence frequency of first data of the N pieces of data in the N pieces of data is greater than or equal to a reference threshold, run-length encoding is performed on the first data. The reference threshold is determined based on N, a quantity of bit occupied by a first element, and a quantity of bit occupied by a second element, the first element is determined based on the first data, and the second element is a consecutive occurrence count of the first data.

Full Text

What is claimed is:

An encoding method and apparatus, a decoding method and apparatus, a device, and a storage medium, related to the field of encoding and decoding technologies. In the encoding method, a data set is obtained, where the data set includes N pieces of data, and N is greater than or equal to 2. If an occurrence frequency of first data of the N pieces of data in the N pieces of data is greater than or equal to a reference threshold, run-length encoding is performed on the first data. The reference threshold is determined based on N, a quantity of bit occupied by a first element, and a quantity of bit occupied by a second element, the first element is determined based on the first data, and the second element is a consecutive occurrence count of the first data.
Timeline
Filed
04/16/2026
Published
08/13/2026
Granted
Not Available
IPC Codes(2)
H03M 7/46:Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind
H03M 7/40:Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code