allocate 10 bytes for the uint
only encode the bytes that matter.