Improves return types with Progress type
This commit is contained in:
@@ -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__
|
Reference in New Issue
Block a user