> 1); } /** * Decodes text * * @param int $gray encoded value to decode * * @return int * * @since 1.0.0 */ public static function decode(int $gray) : int { $source = $gray; while ($gray >>= 1) { $source ^= $gray; } return $source; } }