title: How to convert content of .gz files to lowercase
body: <p>I have many .gz files and i need to convert the content of these files to all lowercase.  I tried:</p>
  
  <pre><code>tr '[:upper:]' '[:lower:]' &lt; input.gz &gt; output.gz 
  </code></pre>
  
  <p>but when I zcat "output.gz" I get this error:</p>
  
  <pre><code>zcat: output.gz: invalid compressed data--format violated
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>dd if=input.gz | gzip -c9 | dd of=output_1.gz conv=lcase
  </code></pre>
  
  <p>I get the same error.  What am I doing wrong, and what is the correct way of doing this task?</p>