> + unsigned EmissionSize = PowerOf2Floor(Remaining); > + if (EmissionSize > 4) > + EmissionSize = 4; Why can't this be an assert(EmissionSize <= 4)? Please also add a test showing the big endian behavior. Cheers, Rafael