Trisurf Monte Carlo simulator
Samo Penic
2019-10-17 7d1025deb3992308e55a8acce884af36253a10af
src/snapshot.c
@@ -153,16 +153,14 @@
   defstream.opaque = Z_NULL;
   defstream.avail_in = data_len+1;
   defstream.next_in = (unsigned char *)data;   
   char *compr=(char *)malloc(data_len*sizeof(char *));
   fprintf(stderr,"WAS HERE %d\n", data_len);
   char *compr=(char *)malloc(data_len*sizeof(char));
   defstream.avail_out = data_len+1;
   defstream.next_out = (unsigned char *)compr;
   deflateInit(&defstream, Z_BEST_COMPRESSION);
       deflate(&defstream, Z_FINISH);
       deflateEnd(&defstream);
   *compressed=compr;
//   *compressed=base64_encode((unsigned char *)compr,(size_t)defstream.total_out,&nbase);
   //fwrite(base64, sizeof(unsigned char), nbase, fh);
//   free(compr);
   return defstream.total_out;
}