public function getCompressionAlgorithm()
    {
        if (isset($this->raw->compression)) {
            if (is_string($this->raw->compression)) {
                if (false === defined('Phar::' . $this->raw->compression)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The compression algorithm "%s" is not supported.',
                            $this->raw->compression
                        )
                    );
                }

                $value = constant('Phar::' . $this->raw->compression);

                // Phar::NONE is not valid for compressFiles()
                if (Phar::NONE === $value) {
                    return null;
                }

                return $value;
            }

            return $this->raw->compression;
        }

        return null;
    }