def streams_for_file_name(file_name)
      raise ArgumentError.new("Cannot auto-detect streams when already a stream: #{file_name.inspect}") if reader_stream?(file_name)

      parts      = file_name.split('.')
      extensions = []
      while extension = parts.pop
        break unless @extensions[extension.to_sym]
        extensions.unshift(extension.to_sym)
      end
      extensions << :file if extensions.size == 0
      extensions
    end
def streams_for_file_name(file_name)
      raise ArgumentError.new("Cannot auto-detect streams when already a stream: #{file_name.inspect}") if reader_stream?(file_name)

      parts      = file_name.split('.')
      extensions = []
      while extension = parts.pop
        break unless @extensions[extension.to_sym]
        extensions.unshift(extension.to_sym)
      end
      extensions << :file if extensions.size == 0
      extensions
    end
Returns [Array] the formats required to process the file by looking at
 its extension(s)

 Extensions supported:
   .zip       Zip File                                   [ :zip ]
   .gz, .gzip GZip File                                  [ :gzip ]
   .enc       File Encrypted using symmetric encryption  [ :enc ]
   other      All other extensions will be returned as:  [ :file ]

 When a file is encrypted, it may also be compressed:
   .zip.enc  [ :zip, :enc ]
   .gz.enc   [ :gz,  :enc ]

 Example Zip file:
   IOStreams.streams_for_file_name('myfile.zip')
   => [ :zip ]

 Example Encrypted Gzip file:
   IOStreams.streams_for_file_name('myfile.csv.gz.enc')
   => [ :gz, :enc ]

 Example plain text / binary file:
   IOStreams.streams_for_file_name('myfile.csv')
   => [ :file ]