载入中...
搜索中...
未找到
CompressedData.h
浏览该文件的文档.
1#pragma once
2
3#include "Compressor.h"
4#include "common/Data.h"
5
6namespace eve {
7namespace data {
8
12class CompressedData : public eve::Data {
13public:
17 CompressedData(std::string format, char *cdata, size_t compressedsize, size_t rawsize, bool own = true);
19 virtual ~CompressedData();
20
24 std::string getFormat() const;
25
30 size_t getDecompressedSize() const;
31
32 // Implements Data.
33 CompressedData *clone() const override;
34 void *getData() const override;
35 size_t getSize() const override;
36
37private:
38 std::string format;
39
40 char *data;
41 size_t dataSize;
42
43 size_t originalSize;
44
45}; // CompressedData
46
47} // namespace data
48} // namespace eve
uint32_t c
Light2D::Data * data
Stores byte data compressed via DataModule::compress.
CompressedData * clone() const override
Creates a duplicate of Data derived class instance.
size_t getDecompressedSize() const
Gets the original (uncompressed) size of the compressed data. May return 0 if the uncompressed size i...
void * getData() const override
Gets a pointer to the data. This pointer will obviously not be valid if the Data object is destroyed.
size_t getSize() const override
Gets the size of the Data in bytes.
std::string getFormat() const
Gets the format that was used to compress the data.
Definition Build.cpp:11