selectProvider
fn
CompressionProvider selectProvider(CompressionFormat fmt, const(char)[] providerName)Pick the best matching provider by format and optional full provider name.
Parameters
fmt | The compression format to find a provider for. |
providerName | Optional 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.
fn
CompressionProvider selectProvider(string formatId, const(char)[] providerName)Pick the best matching provider by string formatId and optional full provider name.
Parameters
formatId | The format identifier string (e.g., "gzip", "bzip2"). |
providerName | Optional 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.