-si (read data from stdin) switch

Makes 7-Zip to use data from stdin (standard input).

Syntax

-si{file_name}
{file_name}
Specifies a name that will be stored in archive for compressed data. If file_name is not specified, data will be stored without name.

Note: Current version of 7-Zip doesn't support reading archives from stdin.

Example

7z a archive.gz -tgzip -siDoc2.txt < Doc.txt

compresses input stream from file Doc.txt to archive.gz archive using Doc2.txt file name.

Commands that can be used with this switch

a (Add), u (Update)