[
https://issues.apache.org/jira/browse/COMPRESS-648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory updated COMPRESS-648:
-------------------------------------
Summary: Add allowlist of supported compressors in CompressorStreamFactory
(was: Adding allowlist of supported compressors in CompressorStreamFactory)
> Add allowlist of supported compressors in CompressorStreamFactory
> -----------------------------------------------------------------
>
> Key: COMPRESS-648
> URL: https://issues.apache.org/jira/browse/COMPRESS-648
> Project: Commons Compress
> Issue Type: Improvement
> Components: Archivers
> Reporter: Yakov Shafranovich
> Priority: Minor
>
> {color:#172b4d}TheĀ
> *[createCompressorInputStream|https://commons.apache.org/proper/commons-compress/apidocs/src-html/org/apache/commons/compress/compressors/CompressorStreamFactory.html#line.521](final
> InputStream in)* method in *CompressorStreamFactory* allows reading a file
> with a specific compressor type or autodetecting the type of the file being
> parsed. However, there is currently no way to provide a list of which
> compressor types should be loaded with autodetection. That means that
> applications that only want to autodetect a subset of files need to use the
> detect() method first followed by the [createCompressorInputStream() with the
> type they
> support.|https://commons.apache.org/proper/commons-compress/apidocs/src-html/org/apache/commons/compress/compressors/CompressorStreamFactory.html#line.521]{color}
> I am proposing adding a new {color:#172b4d}method
> *"createCompressorInputStream(final InputStream in, Set<String>
> allowedNames)"* which will let users pass-in a list of compressor types they
> want to use.{color}
> I have a patch and unit test ready, and can submit those as a Github pull
> request.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)