Broken LZ4 algorithm! The decompression seems to work now (needs improvement?) but the conversion tools emit 64K block sizes which is unhelpfull for us

This commit is contained in:
2022-12-29 23:18:37 +01:00
parent 3554394e11
commit 3d56532a3b
7 changed files with 250 additions and 15 deletions

View File

@@ -12,6 +12,25 @@ namespace JabyEngine {
constexpr ArrayRange(T* start, size_t size) : start(start), size(size) {
}
constexpr void skip(size_t elements) {
this->start += elements;
this->size -= elements;
}
T& pop() {
T& value = *this->start;
ArrayRange::skip(1);
return value;
}
constexpr operator bool() const {
return this->size > 0;
}
constexpr bool operator>=(size_t elements) const {
return this->size >= elements;
}
constexpr T& operator[](size_t idx) {
return this->start[idx];
}