It sounds like some kind of compression algoritm to me, so I wouldn't be surprised if the lengths were arbitrary. If that is the case, I think avoiding vec is preferable.
Update: but I'd love to see someone come up with example code using vec that handled non-power-of-2 lengths.