title: Python: binary file to gz file and then to jpg extension and finally return again to the original binary file
body: <p>I want to do the following in Python:</p>
  
  <ol>
  <li>Take a binary (executable) file</li>
  <li>Turn it into a zip file with gzip (gz extension)</li>
  <li>Then put the jpg extension</li>
  </ol>
  
  <p>Later again the desire to recover the original (without the gz extension or jpg).</p>
  
  <p>The idea is to send binary files through GMail SMTP to recover and then get them over IMAP and process them in ehtir original form (1).</p>