protected function registerMethods(Container $container)
    {
        $orderedMethods = [];

        foreach ($this->methods as $methodClass) {
            /** @var MethodInterface $method */
            $method = new $methodClass();

            if ($method->isSupported()) {
                $container['method.'.$method->getName()] = function() use ($methodClass) {
                    return new $methodClass();
                };

                $orderedMethods[] = 'method.'.$method->getName();
            }
        }

        // order methods
        usort($orderedMethods, function ($methodName1, $methodName2) use ($container) {
            $value1 = ((int) $container[$methodName1]->isSupported()) + ($container[$methodName1]->getUncompressionSpeedLevel() / 10);
            $value2 = ((int) $container[$methodName2]->isSupported()) + ($container[$methodName2]->getUncompressionSpeedLevel() / 10);

            if ($value1 == $value2) {
                return 0;
            }

            return ($value1 > $value2) ? -1 : 1;
        });

        $container['method.__ordered'] = $orderedMethods;
    }