A variable-length encoding and decoding system which includes a variable-length encoding apparatus that encodes a unit data in image data composed of a plurality of sub-data with reference to a probability table and a variable-length decoding apparatus that decodes encoded unit data in image data with reference to the probability table, wherein said variable-length encoding apparatus includes: a table setting means that sets a probability table to initial values based on an initial value of a quantization parameter of the unit data; an initialization information encoding means that encodes initialization information related to said initial value of the quantization parameter of the unit data; a first parameter obtainment means that obtains encoding parameters to be used in the encoding of sub-data from the probability table; a sub-data encoding means that performs an arithmetic encoding on the sub-data with reference to the obtained encoding parameters; and a first probability table updating means that updates the probability table based on the sub-data arithmetically encoded by the sub-data encoding means, wherein said variable-length decoding apparatus includes: an initialization information decoding means that decodes the encoded initialization information related to the initial value of the quantization parameter of the unit data; a probability table initialization means that sets the probability table to initial values based on the decoded initialization information related to the initial value of the quantization parameter of the unit data; a second parameter obtainment means that obtains encoding parameters to be used in the decoding of sub-data from the probability table; a sub-data decoding means that performs an arithmetic decoding on the encoded sub-data with reference to the obtained encoding parameters; and a second probability table updating means that updates the probability table based on the sub-data arithmetically decoded by the sub-data decoding means. a table setting means that sets a probability table to initial values based on an initial value of a quantization parameter of the unit data; an initialization information encoding means that encodes initialization information related to said initial value of the quantization parameter of the unit data; a first parameter obtainment means that obtains encoding parameters to be used in the encoding of sub-data from the probability table; a sub-data encoding means that performs an arithmetic encoding on the sub-data with reference to the obtained encoding parameters; and a first probability table updating means that updates the probability table based on the sub-data arithmetically encoded by the sub-data encoding means, wherein said variable-length decoding apparatus includes: an initialization information decoding means that decodes the encoded initialization information related to the initial value of the quantization parameter of the unit data; a probability table initialization means that sets the probability table to initial values based on the decoded initialization information related to the initial value of the quantization parameter of the unit data; a second parameter obtainment means that obtains encoding parameters to be used in the decoding of sub-data from the probability table; a sub-data decoding means that performs an arithmetic decoding on the encoded sub-data with reference to the obtained encoding parameters; and a second probability table updating means that updates the probability table based on the sub-data arithmetically decoded by the sub-data decoding means. an initialization information decoding means that decodes the encoded initialization information related to the initial value of the quantization parameter of the unit data; a probability table initialization means that sets the probability table to initial values based on the decoded initialization information related to the initial value of the quantization parameter of the unit data; a second parameter obtainment means that obtains encoding parameters to be used in the decoding of sub-data from the probability table; a sub-data decoding means that performs an arithmetic decoding on the encoded sub-data with reference to the obtained encoding parameters; and a second probability table updating means that updates the probability table based on the sub-data arithmetically decoded by the sub-data decoding means.