Decode the data.

@param  mixed  $data
@return int
172679
public function decode($data)
    {
        $decoded = parent::decode($data);

        return 1 === count($decoded) ? reset($decoded) : 0;
    }
1279980
public function decode($data)
    {
        $out = array();

        $this->_data = $data;
        $this->_datalen = strlen($data);
        $this->_ptr = 0;

        while ($this->_curr() !== false) {
            $this->_rfc822SkipLwsp();

            $this->_rfc822ParseMimeToken($param);

            if (is_null($param) || ($this->_curr() != '=')) {
                break;
            }

            ++$this->_ptr;
            $this->_rfc822SkipLwsp();

            $value = '';

            if ($this->_curr() == '"') {
                try {
                    $this->_rfc822ParseQuotedString($value);
                } catch (Horde_Mail_Exception $e) {
                    break;
                }
            } else {
                $this->_rfc822ParseMimeToken($value);
                if (is_null($value)) {
                    break;
                }
            }

            $out[$param] = $value;

            $this->_rfc822SkipLwsp();
            if ($this->_curr() != ';') {
                break;
            }

            ++$this->_ptr;
        }

        return $out;
    }
188431
private function unserialize($data)
    {
        if ($this->type == 'db') {
            return $this->db->decode($data, $this->packed);
        }

        return $this->packed ? @unserialize($data) : $data;
    }
789290
public static function getDecoded($data, $key)
    {
        if (!Any::isArray($data)) {
            $data = self::decode($data);
        }

        return $data === false ? null : $data[$key];
    }
1323724
public static function decode($data)
    {
        $dataLen = strlen($data);

        for ($return = '0', $i = 0; $i < $dataLen; $i++) {
            $current = strpos(self::BASE58_CHARS, $data[$i]);
            $return  = Math::mul($return, '58');
            $return  = Math::add($return, $current);
        }

        $return = Util::encodeHex($return);

        for ($i = 0; $i < $dataLen && substr($data, $i, 1) == '1'; $i++) {
            $return = '00'.$return;
        }

        if (strlen($return) % 2 != 0) {
            $return = '0'.$return;
        }

        return $return;
    }
545778
static public function encode($data)
	{
	    if (is_string($data)) {
	        $data = str_replace(array("\r\n"), "", $data);
	        if (strpos($data, '{') ===0 || strpos($data, '[') ===0) {
	            $data = json_decode($data, true);
	        }
	    }
	    
		return json_encode($data);
	}
238364
public function decode($data)
    {
        $decoded = @unserialize($data, $this->getOptions());

        if ($decoded === false && $data !== serialize(false)) {
            throw new \RuntimeException('Decoding serialized data failed');
        }

        return $this->preserveLines($decoded, ['\\n', '\\r'], ["\n", "\r"]);
    }
648831
public static function decode($data)
    {
        $params = [];
        while ($data) {
            // TODO take care of single byte length values
            // When the highest bit is 1 then 4 byte are used, else 1 byte
            // For both name and value
            /*if ($data[0] >> 7 === 1) {
                // 4 byte
            } else {
                // 1 byte
            }*/
            $header = \unpack('Nname/Nvalue', substr($data, 0, 8));
            $params[substr($data, 8, $header['name'] - 0x80000000)] = substr($data, 8 + $header['name'] - 0x80000000, $header['value'] - 0x80000000);
            $data = substr($data, 8 + ($header['name'] - 0x80000000) + ($header['value'] - 0x80000000));
        }

        return new self($params);
    }
860614
public function decode($data)
    {
        if ($data[0] == 0x00 && $data[1] == 0x01) {
            throw new Exception('LZW flavour not supported.');
        }

        $this->_initsTable();

        $this->_data = $data;
        $this->_dataLength = strlen($data);

        // Initialize pointers
        $this->_bytePointer = 0;
        $this->_bitPointer = 0;

        $this->_nextData = 0;
        $this->_nextBits = 0;

        $oldCode = 0;

        $unCompData = '';

        while (($code = $this->_getNextCode()) != 257) {
            if ($code == 256) {
                $this->_initsTable();
                $code = $this->_getNextCode();

                if ($code == 257) {
                    break;
                }

                if (!isset($this->_sTable[$code])) {
                    throw new Exception('Error while decompression LZW compressed data.');
                }

                $unCompData .= $this->_sTable[$code];
                $oldCode = $code;

            } else {

                if ($code < $this->_tIdx) {
                    $string = $this->_sTable[$code];
                    $unCompData .= $string;

                    $this->_addStringToTable($this->_sTable[$oldCode], $string[0]);
                    $oldCode = $code;
                } else {
                    $string = $this->_sTable[$oldCode];
                    $string = $string . $string[0];
                    $unCompData .= $string;

                    $this->_addStringToTable($string);
                    $oldCode = $code;
                }
            }
        }

        return $unCompData;
    }
1269528
public static function maybe_unserialize($data)
    {
        // If it isn't a string, it isn't serialized
        if (!is_string($data)) {
            return $data;
        }

        $data = trim($data);

        // Is it the serialized NULL value?
        if ($data === 'N;') {
            return null;
        }

        $length = strlen($data);

        // Check some basic requirements of all serialized strings
        if ($length < 4 || $data[1] !== ':' || ($data[$length - 1] !== ';' && $data[$length - 1] !== '}')) {
            return $data;
        }

        // $data is the serialized false value
        if ($data === 'b:0;') {
            return false;
        }

        // Don't attempt to unserialize data that isn't serialized
        $uns = @unserialize($data);

        // Data failed to unserialize?
        if ($uns === false) {
            $uns = @unserialize(self::fix_broken_serialization($data));

            if ($uns === false) {
                return $data;
            } else {
                return $uns;
            }
        } else {
            return $uns;
        }
    }
527511
public function decrypt($data)
	{
		if (!$this->encEnabled) return $data; // no encryption
		switch ($this->encMethod) {
			case 'SIMPLE':
				return $this->decryptSimple($data);
			case 'INTEGER':
				return $this->decryptInteger($data);
		}
		$data=base64_decode(str_replace(array('-', '_'),array('+', '/'),$data));
		$iv_strlen = 2 * openssl_cipher_iv_length($this->encMethod);
		if (preg_match("/^(.{" . $iv_strlen . "})(.+)$/", $data, $regs)) {
			try {
				list(, $iv, $crypted_string) = $regs;
				$decrypted_string = openssl_decrypt($crypted_string, $this->encMethod, $this->encPassword, 0, hex2bin($iv));
				return substr($decrypted_string, strlen($this->encSalt));
			} catch(Exception $ex) {
				return false;
			}
		} else {
			return false;
		}
	}
112017
public static function decrypt($data)
    {
        $iv_size = openssl_cipher_iv_length(static::$cipher);
        
        $iv = Str::slice(sha1(static::$key), 0, $iv_size);

        return openssl_decrypt($data, static::$cipher, static::$key, 0, $iv);
    }
519597
public function decode($data)
    {
        $parser = new Parser();
        $this->arrayData = (array) $parser->parse($data);
        return $this->arrayData;
    }
1035660
protected function decrypt($data)
    {
        $data = base64_decode($data);
        $salt = substr($data, 0, 16);
        $data = substr($data, 16);

        $salted = hash('sha512', $this->key . $salt, true);
        $key    = substr($salted, 0, 32);
        $iv     = substr($salted, 32, 16);

        return openssl_decrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
    }
669217
public function decode($data)
    {
        $decoded = @json_decode($data, $this->getDecodeAssoc(), $this->getDecodeDepth(), $this->getDecodeOptions());

        if (null === $decoded && json_last_error() !== JSON_ERROR_NONE) {
            throw new \RuntimeException('Decoding JSON failed: ' . json_last_error_msg());
        }

        return $decoded;
    }
344705
static public function decode($data)
	{
	    return json_decode($data, true) ? : ($data && $data!='\"\"' && $data !='false' ? $data : null);
	}
1298062
public function decode(string $data): string
    {
        $this->validateInput($data);

        $data = str_split($data);
        $data = array_map(function ($character) {
            return strpos($this->options["characters"], $character);
        }, $data);

        $leadingZeroes = 0;
        while (!empty($data) && 0 === $data[0]) {
            $leadingZeroes++;
            array_shift($data);
        }

        $converted = $this->baseConvert($data, 62, 256);

        if (0 < $leadingZeroes) {
            $converted = array_merge(
                array_fill(0, $leadingZeroes, 0),
                $converted
            );
        }

        return implode("", array_map("chr", $converted));
    }