Add -l list option to only list filenames
The sunzip -l option is equivalent to -t -q -q, but instead of testing decompression will only print the file and directory names as they are encountered in the stream.
Note that file names from the local file headers are less reliable than the end-of-file TOC that would otherwise be used, and may include duplicates, deleted and encrypted files.
Output is silent so that STDOUT can be used with grep etc. Filenames are expressed as they will be written for the local OS (discuss!)
Here is example usage on a 1.9 GB zip file:
curl -sS -L 'https://zenodo.org/record/2838898/files/rnaseqwf_0.5.0_mac.zip?download=1' | sunzip -l
I realized deferred lengths do not work well without decompressing (it can't skip ahead without knowing uncompressed size).
For now e5b5488 -l bails out early with a more useful error message suggesting -t (not ideal as -t has different output format)
Here is an example of deferred length.
I'm curious as to why you opted to use file names from the local file headers, since as you commented these are less reliable than the end-of-file TOC?
(sorry for missing your comment, @woolfie!)
This was to get filenames listed on STDOUT as soon as the zip is streaming, rather than wait for the end TOC - however of course you still need to wait for the end to get the complete list. If you are only interested in say the first 100 files (get an excerpt list of content for en duser) then you can can Ctrl-C early.