title: "'iso-8859-1' is not a supported encoding name" exception while Decompress compressed string in Silverlight 5 using DotNetZip (Ionic.Zlib)
body: <p>I have WCF Service, consumed by Silverlight client. In the service I create a string (which is representing a <code>.csv</code> file) and I compress it. When I try to decompress it on the client I get the following exception:</p>
  
  <blockquote>
    <p>System.ArgumentException: 'iso-8859-1' is not a supported encoding name.<br>
    Parameter name: name<br>
    at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)<br>
    at System.Globalization.EncodingTable.GetCodePageFromName(String name)<br>
    at System.Text.Encoding.GetEncoding(String name)<br>
    at Ionic.Zlib.GZipStream..cctor()}    </p>
  </blockquote>
  
  <p>I didn't manage to find any info about what is causing this and how to be avoided. I'll be grateful for any help!</p>
  
  <p>The code used is the following:</p>
  
  <p>Service:</p>
  
  <pre><code>private static byte[] Zip(string str)
  {
          var bytes = Encoding.UTF8.GetBytes(str);
  
          using (var msInput = new MemoryStream(bytes))
          using (var msOutput = new MemoryStream())
          {
              using (var gs = new GZipStream(msOutput, CompressionMode.Compress))
              {
                  msInput.CopyTo(gs);             
              }
  
              return msOutput.ToArray();
          }
  }
  </code></pre>
  
  <p>Silverlight client:</p>
  
  <pre><code>private void UnzipToTheExportStream(byte[] bytes)
  {
      using (var msi = new MemoryStream(bytes))
      using (_exportStream)
      {
          using (var gs = new GZipStream(msi, CompressionMode.Decompress))
          {
              gs.CopyTo(_exportStream);
          }
      }
  }
  </code></pre>
  
  <p>The exception is happening upon the initialization of the <code>GZipStream</code>. For decompression I use DotNetZip (<code>Ionic.Zlib</code>). For compression I tried both DotNetZip and <code>System.IO.Compression</code> (which is not available in Silverlight) but with same result</p>