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