Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-648

Add allowlist of supported compressors in CompressorStreamFactory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.25.0
    • Archivers
    • None

    Description

      TheĀ createCompressorInputStream(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.

      I am proposing adding a new method "createCompressorInputStream(final InputStream in, Set<String> allowedNames)" which will let users pass-in a list of compressor types they want to use.

      I have a patch and unit test ready, and can submit those as a Github pull request.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yakovsh Yakov Shafranovich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: