add buffer size as parameter for gamma based rl encoding/decoding