title: Decompressing with PyLZMA
body: <p>I compress my files using this script</p>
  
  <pre><code>import pylzma, struct
  i = open(path+fileName,'rb')
  o = open(path+zipName+'.zip','wb')
  data = i.read()
  c = pylzma.compressfile(data, eos=1)
  result = c.read(5)
  result += struct.pack('&lt;Q', len(data))
  o.write(result + c.read())
  i.close()
  o.close()
  </code></pre>
  
  <p>I use this method as shown in the <a href="https://github.com/fancycode/pylzma/blob/3d308de8b559ef5b7b5e1566cbc929d1fe278eda/doc/usage.txt" rel="nofollow">PyLZMA documentation</a> because it allows my files to be readable by 7zip or lzma.exe. Decompression using 7zip works fine but it does not work when I use PyLZMA. I use this:</p>
  
  <pre><code>i = open(path+name+'.zip', 'rb')
  o = open(path+name, 'wb')
  data = i.read()
  u = pylzma.decompress(data)
  o.write(u)
  </code></pre>
  
  <p>It stops on pylzma.decompress and I receive the following error:</p>
  
  <blockquote>
    <p>TypeError: Error while decompressing: 1</p>
  </blockquote>