Primitives to bytes.