A method and a system for discharging a variable-length coding, and the code words of the positioning device