A replacing program that causes a computer to execute a process comprising: receiving an encoded data, the encoded data including a plurality of first codes, a plurality of second codes, and a dynamic dictionary, the plurality of first codes being associated with a plurality of first character strings in the first dictionary, respectively, the plurality of second codes being associated with a plurality of second character strings, respectively, that are not registered in the first dictionary, each of the plurality of second codes being associated with a corresponding second character string of the plurality of second character strings and a preliminary code in the dynamic dictionary, wherein the preliminary code has a predetermined value which indicates that a specific second code is not stored in the dynamic dictionary for the corresponding second character string; characterized in that the process further comprises: determining whether each of the plurality of second character strings is registered in a second dictionary included in the computer, wherein the second dictionary comprises the first dictionary and is larger than the first dictionary; and replacing the corresponding preliminary code by a corresponding specific second code in the dynamic dictionary, for those second character strings of the plurality of second character strings which are determined to be registered in the second dictionary, wherein the second dictionary establishes a correspondence between each of these second character strings of the plurality of second character strings which are determined to be registered in the second dictionary and the corresponding specific second code. receiving an encoded data, the encoded data including a plurality of first codes, a plurality of second codes, and a dynamic dictionary, the plurality of first codes being associated with a plurality of first character strings in the first dictionary, respectively, the plurality of second codes being associated with a plurality of second character strings, respectively, that are not registered in the first dictionary, each of the plurality of second codes being associated with a corresponding second character string of the plurality of second character strings and a preliminary code in the dynamic dictionary, wherein the preliminary code has a predetermined value which indicates that a specific second code is not stored in the dynamic dictionary for the corresponding second character string; characterized in that the process further comprises: determining whether each of the plurality of second character strings is registered in a second dictionary included in the computer, wherein the second dictionary comprises the first dictionary and is larger than the first dictionary; and replacing the corresponding preliminary code by a corresponding specific second code in the dynamic dictionary, for those second character strings of the plurality of second character strings which are determined to be registered in the second dictionary, wherein the second dictionary establishes a correspondence between each of these second character strings of the plurality of second character strings which are determined to be registered in the second dictionary and the corresponding specific second code. determining whether each of the plurality of second character strings is registered in a second dictionary included in the computer, wherein the second dictionary comprises the first dictionary and is larger than the first dictionary; and replacing the corresponding preliminary code by a corresponding specific second code in the dynamic dictionary, for those second character strings of the plurality of second character strings which are determined to be registered in the second dictionary, wherein the second dictionary establishes a correspondence between each of these second character strings of the plurality of second character strings which are determined to be registered in the second dictionary and the corresponding specific second code.