RLE encoding may encode "literally" when it doesn't find sufficient repeated values.
Consider a scenarios where consecutive (non-repeated) integers are encoded using RLE encoding. In that case values are encoded in literal fashion. Literal count is encoded and it's a multiple of 8.
When the number of values are not multiple of 8, literal count is rounded up to multiple of 8.
For e.g. if number of values is 100, then literal_count is 104 but max_bytes is correctly set at 100 for int8 datatype.
In this scenario after reading the last value when ret is 0, literal_count still remains at 4.
Hence the next GetValue return false since it's trying to read beyond max_bytes.