| Bill Allombert on Fri, 13 Sep 2024 09:50:24 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: [PATCH 2.16.2-beta] compressed input |
On Thu, Sep 12, 2024 at 06:28:07AM -0700, Ilya Zakharevich wrote:
> On Mon, Sep 09, 2024 at 11:35:35PM +0200, Bill Allombert wrote:
> > > > + {".bz2", "bzip2 -dc"},
> > > > + {".xz", "xz -dc"},
> > > > + {".zstd", "zstd -dc"},
> > > > + {".7z", "7za -so e"},
> > > > + {".zip", "unzip -p"},
> > > > + {NULL, NULL}
> > > > +};
> > >
> > > You could also add lzma, lz and lzop.
>
> What for? They are already supported by (many!) tools included
> above. (Just rename the archive adding an appropriate extension…)
In any case, GP need to know which extensions should be considered as
compressed files.
> P.S. And yes, having a default()able map extending the table above
> may be nice — e.g., to do multithreaded decompression…
Yes, this way PARI would not need to hardcode a list of extensions.
Something like
default(decompress,"gz,Z:gzip -dc;xz:xz -dc;zstd:zstd -dc")
Cheers,
Bill