2 byte length is probably fine. Why not just use standard voltdb serialization?