Files
西风逍遥游 4377e062dd feat: zeroerr parameter validation + Doxygen API documentation
Squashed onto current main. Adds src/engine/common/Assert.h (EV_PARAM_CHECK / EV_ASSERT backed by zeroerr), an EVENGINE_ENABLE_ASSERTS option (non-Debug builds strip ZEROERR_NO_ASSERT unless enabled), parameter checks at key entry points, Doxygen comments across headers, Doxyfile + make docs / CMake docs targets, and Windows setup + code conventions in AGENTS.md.
2026-08-19 09:01:12 +08:00

49 lines
1.1 KiB
C++

#pragma once
#include "Compressor.h"
#include "common/Data.h"
namespace eve {
namespace data {
/**
* @brief Stores byte data compressed via DataModule::compress.
**/
class CompressedData : public eve::Data {
public:
/**
* @brief Constructor just stores already-compressed data in the object.
**/
CompressedData(std::string format, char *cdata, size_t compressedsize, size_t rawsize, bool own = true);
CompressedData(const CompressedData &c);
virtual ~CompressedData();
/**
* @brief Gets the format that was used to compress the data.
**/
std::string getFormat() const;
/**
* @brief Gets the original (uncompressed) size of the compressed data. May return
* 0 if the uncompressed size is unknown.
**/
size_t getDecompressedSize() const;
// Implements Data.
CompressedData *clone() const override;
void *getData() const override;
size_t getSize() const override;
private:
std::string format;
char *data;
size_t dataSize;
size_t originalSize;
}; // CompressedData
} // namespace data
} // namespace eve