selectProvider

fnCompressionProvider selectProvider(CompressionFormat fmt, const(char)[] providerName)

Pick the best matching provider by format and optional full provider name.

Parameters

fmtThe compression format to find a provider for.
providerNameOptional full provider name (e.g., "ddn-gzip"). If empty, the highest priority provider is selected.

Returns

The selected provider.

Throws

CompressionError if no provider is registered for the format, or if

the requested provider name is not found. Pick the best matching provider by format and optional full name.

Selects the provider with the highest priority; when providerName is given, the provider with that exact full name is required instead.

Params: fmt = The compression format to select for. providerName = Optional full provider name (e.g., "ddn-gzip").

Returns: The selected provider.

Throws: CompressionError if no provider is registered for the format or the requested name is not found.

fnCompressionProvider selectProvider(string formatId, const(char)[] providerName)

Pick the best matching provider by string formatId and optional full provider name.

Parameters

formatIdThe format identifier string (e.g., "gzip", "bzip2").
providerNameOptional full provider name (e.g., "ddn-gzip"). If empty, the highest priority provider is selected.

Returns

The selected provider.

Throws

CompressionError if no provider is registered for the formatId, or if

the requested provider name is not found.