A method for encoding and decoding variable length