An encoder comprising: an integer transformer that obtains a plurality of sets of integer values from an inputted sequence of integer values according to a predetermined rule and obtains one integer value, hereinafter referred to as a "transformed integer", through algebraically-representable bijective transformation for each of the plurality of sets of integer values; and an integer encoder that obtains a code by Golomb-Rice encoding the respective transformed integers, characterized in that assuming that MA is the number of integer values included in the set of integer values, x 1 , x 2 , ..., x MA are integer values included in the set of integer values, the integer transformer obtains the transformed integer y which is the one integer value by calculating the following formula: y = ƒ MA x 1 , x 2 , ... , x MA where assuming that f M' (x 1 , x 2 , ..., x M' ) receives a sequence x 1 , x 2 , ..., x M' of M' variables as input, which is a recursive function having one variable as output, a maximum value of M' variables x 1 , x 2 , ..., x M' is x max , the number of variables that take maximum values is K, numbers of K variables that take maximum values within the variable sequence are m 1 , m 2 , ..., m K respectively, a sequence of (M'-K) variables obtained by excluding the variables that take maximum values from the variable sequence x 1 , x 2 , ..., x M' is ∼ x 1 , ∼ x 2 , ..., ~ x M'-K , a C b is the number of combinations for selecting "b" integer values from "a" integer values, f 0 is 0, the function f M' is a recursive function that calculates the following formula: ƒ M ′ x 1 , x 2 , ... , x M ′ = ∑ m = 0 K − 1 C m M ′ x max M ′ − m + C K M ′ ƒ M ′ − K x ̃ 1 , x ̃ 2 ,... , x ̃ M ′ - K + ∑ i = 0 K − 1 C K − i M ′ - m i + 1 . an integer transformer that obtains a plurality of sets of integer values from an inputted sequence of integer values according to a predetermined rule and obtains one integer value, hereinafter referred to as a "transformed integer", through algebraically-representable bijective transformation for each of the plurality of sets of integer values; and an integer encoder that obtains a code by Golomb-Rice encoding the respective transformed integers, characterized in that assuming that MA is the number of integer values included in the set of integer values, x 1 , x 2 , ..., x MA are integer values included in the set of integer values, the integer transformer obtains the transformed integer y which is the one integer value by calculating the following formula: y = ƒ MA x 1 , x 2 , ... , x MA where assuming that f M' (x 1 , x 2 , ..., x M' ) receives a sequence x 1 , x 2 , ..., x M' of M' variables as input, which is a recursive function having one variable as output, a maximum value of M' variables x 1 , x 2 , ..., x M' is x max , the number of variables that take maximum values is K, numbers of K variables that take maximum values within the variable sequence are m 1 , m 2 , ..., m K respectively, a sequence of (M'-K) variables obtained by excluding the variables that take maximum values from the variable sequence x 1 , x 2 , ..., x M' is ∼ x 1 , ∼ x 2 , ..., ~ x M'-K , a C b is the number of combinations for selecting "b" integer values from "a" integer values, f 0 is 0, the function f M' is a recursive function that calculates the following formula: ƒ M ′ x 1 , x 2 , ... , x M ′ = ∑ m = 0 K − 1 C m M ′ x max M ′ − m + C K M ′ ƒ M ′ − K x ̃ 1 , x ̃ 2 ,... , x ̃ M ′ - K + ∑ i = 0 K − 1 C K − i M ′ - m i + 1 . <EOS>