private static function decodeMap($additional, &$bytes)
    {
        $length = self::decodeIntValue($additional, $bytes);

        $map = array();
        for ($i = 0; $i < $length; $i++)
        {
            $key = self::recursiveDecode($bytes);
            if (array_key_exists($key, $map))
            {
                throw new CborException("Map contains multiple keys with same value.");
            }

            $value = self::recursiveDecode($bytes);
            $map[$key] = $value;
        }

        return $map;
    }