![]() |
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <GZipFile.h>
Public Types | |
enum | eMode { fmRead, fmWrite } |
Public Member Functions | |
cGZipFile (void) | |
void | Close (void) |
Closes the file, flushing all buffers. More... | |
bool | Open (const AString &a_FileName, eMode a_Mode) |
Opens the file. More... | |
int | ReadRestOfFile (AString &a_Contents) |
Reads the rest of the file and decompresses it into a_Contents. More... | |
bool | Write (const AString &a_Contents) |
Writes a_Contents into file, compressing it along the way. More... | |
bool | Write (const char *a_Data, int a_Size) |
~cGZipFile () | |
Protected Attributes | |
gzFile | m_File |
eMode | m_Mode |
Definition at line 18 of file GZipFile.h.
enum cGZipFile::eMode |
Enumerator | |
---|---|
fmRead | |
fmWrite |
Definition at line 21 of file GZipFile.h.
cGZipFile::cGZipFile | ( | void | ) |
Definition at line 13 of file GZipFile.cpp.
cGZipFile::~cGZipFile | ( | ) |
Definition at line 22 of file GZipFile.cpp.
void cGZipFile::Close | ( | void | ) |
Closes the file, flushing all buffers.
This object may be then reused for a different file and / or mode
Definition at line 47 of file GZipFile.cpp.
Opens the file.
Returns true if successful. Fails if a file has already been opened through this object.
Definition at line 31 of file GZipFile.cpp.
int cGZipFile::ReadRestOfFile | ( | AString & | a_Contents | ) |
Reads the rest of the file and decompresses it into a_Contents.
Returns the number of decompressed bytes, <0 for error
Definition at line 60 of file GZipFile.cpp.
|
inline |
Writes a_Contents into file, compressing it along the way.
Returns true if successful. Multiple writes are supported.
Definition at line 40 of file GZipFile.h.
bool cGZipFile::Write | ( | const char * | a_Data, |
int | a_Size | ||
) |
Definition at line 91 of file GZipFile.cpp.
|
protected |
Definition at line 45 of file GZipFile.h.
|
protected |
Definition at line 46 of file GZipFile.h.