This suggestion comes from @jpivarski in an IRIS-HEP Slack thread:
@kratsg: It's pretty easy for pyhf to just pipe through, e.g. gunzip foo.zip --extract bkgonly.json | pyhf inspect
@jpivarski: You could also make it easier on pyhf users by recognizing the zipped data by magic headers: gzip (b"\x1f\x8b"), zip (b"PK"), JSON (re.compile(br"^\s*{")), then use Python's gzip or zipfile internally. Then you could just pipe it in without worrying about whether it's compressed: you'd take on compressed JSON as a recognized input format.
Description
This suggestion comes from @jpivarski in an IRIS-HEP Slack thread: