add gamma code based rl encoding (alphabet size limited to 8)