32 #ifndef ZippedFile_INCLUDE_ONCE 33 #define ZippedFile_INCLUDE_ONCE 138 static const int CHUNK_SIZE = 128*1024;
153 virtual bool exists()
const;
157 virtual bool isOpen()
const;
159 virtual void close();
161 virtual long long size()
const;
163 bool extract(
char* destination,
bool check_sum =
true);
168 super::operator=(other);
170 if (mZippedFileInfo->sourceZipFile())
173 mZippedFileInfo->setSourceZipFile(src_zip_copy.
get());
183 virtual long long read_Implementation(
void* buffer,
long long bytes_to_read);
187 virtual bool fillUncompressedBuffer();
191 virtual bool seekSet_Implementation(
long long);
198 unsigned char mZipBufferIn[CHUNK_SIZE];
199 unsigned char mZipBufferOut[CHUNK_SIZE];
205 bool compress(
const void* data,
size_t size, std::vector<unsigned char>& out,
int level);
206 bool decompress(
const void* cdata,
size_t csize,
void* data_out);
bool decompress(const void *cdata, size_t csize, void *data_out)
unsigned short compressionMethod() const
An abstract class representing a file.
Collects the information about a ZippedFile.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
unsigned short mCompressionMethod
virtual long long position_Implementation() const
unsigned short mExtraFieldLength
ref< ZippedFileInfo > mZippedFileInfo
const String & path() const
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
bool compress(const void *data, size_t size, std::vector< unsigned char > &out, int level)
virtual long long write_Implementation(const void *, long long)
ref< VirtualFile > mSourceZipFile
Visualization Library main namespace.
unsigned short extraFieldLength() const
unsigned int zippedFileOffset() const
unsigned short mFileNameLength
The base class for all the reference counted objects.
A VirtualDirectory capable of reading files from a .zip file.
unsigned short generalPurposeFlag() const
unsigned int compressedSize() const
unsigned int uncompressedSize() const
void setSourceZipFile(VirtualFile *file)
unsigned short mGeneralPurposeFlag
unsigned int mZippedFileOffset
int mUncompressedBufferPtr
const VirtualFile * sourceZipFile() const
The ref<> class is used to reference-count an Object.
unsigned short mVersionNeeded
unsigned int crc32() const
VirtualFile * sourceZipFile()
ZippedFile & operator=(const ZippedFile &other)
unsigned short fileNameLength() const
unsigned short versionNeeded() const
std::vector< char > mUncompressedBuffer
A VirtualFile used to read a file contained in a .zip archive.
unsigned int mCompressedSize
unsigned int mUncompressedSize