rusty-ferris-club/decompress

Add `filter` and `map` to file paths

jondot opened this issue · 0 comments

Suggestion / Feature Request

Just like in the npm version of decompress: https://github.com/kevva/decompress#filter

The idea is to let users:

  • filter out items from decompression, in archives that support listing of entries (filter)
  • rename destination paths or file names (map)

There are two primary challenges:

  1. Accepting a type of such a function in a clean, easy way, through Opts. It can be an Fn signature, or a trait called FilterMap which implements an identity filter and map by default, and then passed through a Box<dyn ..>
  2. Understanding which compressor can support such operations and which cannot (don't fight with those which cannot, just don't implement for those)