summaryrefslogtreecommitdiff
path: root/src/serializerbzip2.h
blob: 4aeb22e1044f0a912ec20d94ac63921174e9688a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SERIALIZER_BINARY_H
#define SERIALIZER_BINARY_H

#include "serializer.h"
#include <stdio.h>

class SerializerBZip2 : public Serializer
{
public:
	SerializerBZip2(FILE *fhFile, bool bLoading);
	SerializerBZip2(char *sFileName, bool bLoading);
	virtual ~SerializerBZip2();

	virtual void close();

	virtual void write(const void *, int32_t);
	virtual void read(void *, int32_t);
	
private:
	void checkBZError();
	FILE *fhFile;
	void *bzFile;
	bool bCloseFile;
	int bzerror;
};

#endif