CPC H03M 7/14 (2013.01) [H04L 1/0056 (2013.01)] | 11 Claims |
1. An encoding method, comprising:
traversing a to-be-encoded string;
searching for a preset string in the to-be-encoded string; and
deleting the preset string in the to-be-encoded string if the preset string is found, to obtain a target string,
wherein after the preset string is found, the method further comprises:
obtaining an index value of the found preset string in the to-be-encoded string; and
during the deleting the preset string in the to-be-encoded string, to obtain a target string, the method further comprises:
inserting the index value into the target string in a preset insertion manner, a length of the preset string being not less than a placeholder length of the index value.
|