I followed what we do in DefaultHttpHeaders. But yeah I think we could also use power of two and bitwise operation to get a remainder.