title: Download and extract archive on Windows
body: <p>On Windows, how can I download a tar.xz archive and extract it without writing it to disk first?</p>
  
  <p>This attempt:</p>
  
  <pre><code>curl -L https://www.example.com/archive.tar.xz | 7z x -si -so | 7z x -si -ttar -ofolder
  </code></pre>
  
  <p>Gives errors similar to this:</p>
  
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
  
  Extracting archive: ERROR:
  
  Can not open encrypted archive. Wrong password?
  
  Not implemented
  --
  Path =
  Type = tar
  Code Page = UTF-8
  
  Everything is Ok
  
  Files: 0
  Size:       0
  Compressed: 0
  100   144  100   144    0     0    144      0  0:00:01 --:--:--  0:00:01   214
  (23) Failed writing body
  </code></pre>
  
  <p>It works when writing the archive to disk first:</p>
  
  <pre><code>curl -L https://www.example.com/archive.tar.xz -o temp.tar.xz &amp;&amp; 7z x -so temp.tar.xz | 7z x -si -ttar -ofolder &amp;&amp; del temp.tar.xz
  </code></pre>