From be7360a9bb35675b9c96da1ef59ba7cfa035b1d9 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 7 Oct 2022 10:18:57 +0200 Subject: [PATCH] Added how to uncompress a stream to stdout to the KB --- .../print a compressed stream to stdout.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 knowledge base/print a compressed stream to stdout.md diff --git a/knowledge base/print a compressed stream to stdout.md b/knowledge base/print a compressed stream to stdout.md new file mode 100644 index 0000000..bbfa4cd --- /dev/null +++ b/knowledge base/print a compressed stream to stdout.md @@ -0,0 +1,14 @@ +# Print a compressed stream to stdout + +```sh +cat file.zip | zcat +cat file.zip | busybox unzip -p - +cat file.gz | gunzip -c - +curl 'https://example.com/some.zip' | bsdtar -xOf - +``` + +## Sources + +- [Unzip from stdin to stdout] + +[unzip from stdin to stdout]: https://serverfault.com/questions/735882/unzip-from-stdin-to-stdout-funzip-python