Fix off-by-one error when compressing frames

Iterating over an array of length L with stepsize S != 1 gives L/S+1
steps, not L/S. This caused the "char" type to overflow when compressing
primary colors. Closes #6.