codec: use bytes directly

Using []byte directly is more performant, and more in line with the other codecs being measured.

This reduces the time by about 10% on my laptop.