A method for determining a length of a message block from a length candidate set, received by a receiver through a wireless communication channel, comprising steps of: - Selecting a length candidate, N, among said length candidate set and initializing a current best value, S best, to a threshold, Δ; - Decoding a received frame to form a decoded sequence that includes a message of a length equal to said length candidate, N, by a Viterbi decoder; - Calculating a Viterbi variable, S, for said length candidate, N, by said Viterbi decoder. - Comparing said Viterbi variable with said current best value, S best, - if said Viterbi variable, S is greater than said current best value, S best, and: o if there exists at least one unselected length candidate among said length candidate set:repeating the selecting (401, 408), decoding and calculating steps, o if there is no more length candidate, testing the current best length candidate, N end, that has been found in order to output said current best length candidate, N end, as the best estimation of the real length of said message block, - if said Viterbi variable is not greater than a current best value, S best, updating said current best value, S best, to said Viterbi variable, S, and updating a current best length, N end, to said length candidate: ∘ if there exists at least one unselected length candidate, repeating the selecting (401, 408), decoding and calculating steps, ∘ if there is no more length candidates, said current best length, N end updated at the updating step is outputted as the best estimation of the real length of said message block, - characterized in that said threshold, Δ, is initially defined as a function of at least a noise-to-signal ratio estimated by a DPCH_Ec/Ioc parameter, said DPCH_Ec/Ioc parameter representing the ratio of the transmit energy per pseudo-noise chip of the Dedicated Physical Channel to the total transmit power spectral density. - Selecting a length candidate, N, among said length candidate set and initializing a current best value, S best, to a threshold, Δ; - Decoding a received frame to form a decoded sequence that includes a message of a length equal to said length candidate, N, by a Viterbi decoder; - Calculating a Viterbi variable, S, for said length candidate, N, by said Viterbi decoder. - Comparing said Viterbi variable with said current best value, S best, - if said Viterbi variable, S is greater than said current best value, S best, and: o if there exists at least one unselected length candidate among said length candidate set:repeating the selecting (401, 408), decoding and calculating steps, o if there is no more length candidate, testing the current best length candidate, N end, that has been found in order to output said current best length candidate, N end, as the best estimation of the real length of said message block, o if there exists at least one unselected length candidate among said length candidate set:repeating the selecting (401, 408), decoding and calculating steps, o if there is no more length candidate, testing the current best length candidate, N end, that has been found in order to output said current best length candidate, N end, as the best estimation of the real length of said message block, - if said Viterbi variable is not greater than a current best value, S best, updating said current best value, S best, to said Viterbi variable, S, and updating a current best length, N end, to said length candidate: ∘ if there exists at least one unselected length candidate, repeating the selecting (401, 408), decoding and calculating steps, ∘ if there is no more length candidates, said current best length, N end updated at the updating step is outputted as the best estimation of the real length of said message block, ∘ if there exists at least one unselected length candidate, repeating the selecting (401, 408), decoding and calculating steps, ∘ if there is no more length candidates, said current best length, N end updated at the updating step is outputted as the best estimation of the real length of said message block, - characterized in that said threshold, Δ, is initially defined as a function of at least a noise-to-signal ratio estimated by a DPCH_Ec/Ioc parameter, said DPCH_Ec/Ioc parameter representing the ratio of the transmit energy per pseudo-noise chip of the Dedicated Physical Channel to the total transmit power spectral density.