protected function add(CompressionMethod $compressionMethod)
    {
        $name = $compressionMethod->name();
        if ($this->has($name)) {
            throw new \InvalidArgumentException(\sprintf('The compression method "%s" is already supported.', $name));
        }

        $this->compressionMethods[$name] = $compressionMethod;
    }