compress refactor

This commit is contained in:
2025-02-27 21:45:09 +01:00
parent 6a52b7fe2a
commit f6620dc522
4 changed files with 48 additions and 17 deletions

View File

@@ -13,6 +13,13 @@ class IOInterface {
void Write(const DataBuffer& a_Data);
};
template <typename IOTag>
class MessageEncapsulator {
public:
static DataBuffer Encapsulate(const DataBuffer& a_Data);
static DataBuffer Decapsulate(DataBuffer& a_Data, std::size_t a_Length);
};
template <typename IOTag, typename MessageDispatcher, typename MessageFactory>
class Stream {
protected:
@@ -32,6 +39,10 @@ class Stream {
MessageDispatcher& GetDispatcher() {
return m_Dispatcher;
}
private:
static DataBuffer Encapsulate(const DataBuffer& a_Data);
static DataBuffer Decapsulate(DataBuffer& a_Data, std::size_t a_Length);
};
} // namespace io