#include #include class Accumulator { public: void addData(const char* data, size_t size) { // 将新的数据块追加到累加器 dataBlocks.insert(dataBlocks.end(), data, data + size); } size_t getDataSize() const { return dataBlocks.size(); } const char* getData() const { return dataBlocks.data(); } void clear() { dataBlocks.clear(); } private: std::vector dataBlocks; };