Improves return types with Progress type

This commit is contained in:
2022-12-23 22:06:10 +01:00
parent 64b36f4f85
commit 4b644aa813
7 changed files with 71 additions and 15 deletions

View File

@@ -1,7 +1,32 @@
#ifndef __JABYENGINE_LZ4_DECOMPRESSOR_HPP__
#define __JABYENGINE_LZ4_DECOMPRESSOR_HPP__
#include "../../stddef.h"
#include "types.hpp"
namespace JabyEngine {
class LZ4Decompressor {
public:
enum struct Result {
InProgress = 0,
Done,
Error
};
private:
struct State {};
private:
uint8_t* dst_adr = nullptr;
State state;
public:
LZ4Decompressor() = default;
void setup(uint8_t* dst_adr);
void reset();
Progress process(const uint8_t* data, size_t size);
};
}
#endif //!__JABYENGINE_LZ4_DECOMPRESSOR_HPP__