title: ascii output of string compression in C
body: <p>I need to use both compression and encryption in a project. There are two programs in the project. </p>
  
  <p>In the first program, an ascii text file is first compressed and then encrypted. Further operations follow on this encrypted version of the file. However, a second program in the project follows the reverse process i.e. first decrypts and then decompresses to get the original ascii text file.</p>
  
  <p>I've implemented the encryption module (aes via openssl) and it works fine. But when i looked for compression options in linux, i found that gzip, zlib etc throw their own versions of the file i.e. filename.gz or some other extension, the contents of which are not purely ascii. (For instance, i see diamond shaped symbols when i view the output in the terminal) Beause of this, i'm unable to read the compressed file completely in my C program. </p>
  
  <p>So in short, i require a compressed file which contains only ascii characters. Is this possible by any means?</p>