#include <stdio.h>
#include <zlib.h>
#include "GZFileLogger.h"

GZFileLogger::GZFileLogger()
{
}

short GZFileLogger::openFile(char * name)
{
	isOpened=1;
	fileName=name;
	outFile = gzopen(fileName,"wb");
	if (outFile==NULL)
	{
		fprintf (stderr,"Coudln't open file %s\n",name);
	}
	return (outFile!=NULL);
}

GZFileLogger::~GZFileLogger()
{
	if (isOpened)
	{
		closeFile();
	}
}




