diff options
Diffstat (limited to 'src/CircularBufferCompressor.h')
-rw-r--r-- | src/CircularBufferCompressor.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/CircularBufferCompressor.h b/src/CircularBufferCompressor.h new file mode 100644 index 000000000..12c708baf --- /dev/null +++ b/src/CircularBufferCompressor.h @@ -0,0 +1,43 @@ + +#pragma once + +#include "StringCompression.h" + + + + + +class CircularBufferCompressor +{ +public: + + ContiguousByteBufferView GetView() const; + + Compression::Result Compress(); + void ReadFrom(cByteBuffer & Buffer); + void ReadFrom(cByteBuffer & Buffer, size_t Size); + +private: + + Compression::Compressor m_Compressor; + std::basic_string<std::byte> m_ContiguousIntermediate; +}; + + + + + +class CircularBufferExtractor +{ +public: + + ContiguousByteBufferView GetView() const; + + Compression::Result Extract(size_t UncompressedSize); + void ReadFrom(cByteBuffer & Buffer, size_t Size); + +private: + + Compression::Extractor m_Extractor; + std::basic_string<std::byte> m_ContiguousIntermediate; +}; |