1. A method of decoding variable-length codes with a processor comprising: allocating, during run-time, memory locations to serve as general purpose registers; loading datum including at least one variable-length codes; storing the variable-length code among the general purpose registers; decoding the variable-length code; and storing the decoded variable-length code among the plurality of general purpose registers.