--- libaitsync/src/zc.c 2012/11/13 10:30:44 1.3.2.1 +++ libaitsync/src/zc.c 2014/02/04 16:58:17 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: zc.c,v 1.3.2.1 2012/11/13 10:30:44 misho Exp $ +* $Id: zc.c,v 1.5 2014/02/04 16:58:17 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004 - 2014 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -90,7 +90,7 @@ sync_Deflate(int inf, int outf, int level) flush = sync_EOF(inf) ? Z_FINISH : Z_NO_FLUSH; do { - // compress and write to file + /* compress and write to file */ z.avail_out = readed; z.next_out = obuf; ret = deflate(&z, flush); @@ -117,13 +117,14 @@ sync_Deflate(int inf, int outf, int level) } } while (flush != Z_FINISH); - // free zlib + /* free zlib */ deflateEnd(&z); return ret; } /* - * sync_Inflate() LibZ inflate data + * sync_Inflate() - LibZ inflate data + * * @inf = Input file * @outf = Output file * return: -1 error, != -1 ok @@ -141,14 +142,14 @@ sync_Inflate(int inf, int outf) return -1; } - // init zlib + /* init zlib */ memset(&z, 0, sizeof z); ret = inflateInit(&z); if (ret) return ret; do { - // set input buffer for decompress + /* set input buffer for decompress */ ret = read(inf, ibuf, Z_CHUNK); if (-1 == ret) { LOGERR; @@ -162,7 +163,7 @@ sync_Inflate(int inf, int outf) flush = Z_NO_FLUSH; do { - // decompress and write to file + /* decompress and write to file */ z.avail_out = Z_CHUNK; z.next_out = obuf; ret = inflate(&z, flush); @@ -186,7 +187,7 @@ sync_Inflate(int inf, int outf) } while (!z.avail_out); } while (flush != Z_STREAM_END); - // free zlib + /* free zlib */ inflateEnd(&z); return ret; }