The command:
$ gzip -c foo | gzip -l -
produces the following output consistently:
compressed uncompressed ratio uncompressed_name
-1 -1 0.0% stdout
This is not the expected output, as demonstrated by:
$ gzip -c foo > foo.gz
$ gzip -l - < foo.gz
compressed uncompressed ratio uncompressed_name
2023 5006 60.2% stdout
$ cat foo.gz | gzip -l -
compressed uncompressed ratio uncompressed_name
-1 -1 0.0% stdout
It's clear that this bug only affects piped input into gzip -l. Why piped input
should be handled differently to stdin input is beyond me.