Open demolen opened 4 months ago
maybe using GZipStream or DeflateStream.?
Hello @demolen I honestly dont know if it is even possible to use such algorithms, since data are constantly written to circular buffer. It is continuous stream and I would guess these compression algorithms would work best if they were applied on the whole data/stream (finding similarities, compressing them etc...).
But it would probably make sense to implement some compression algorithm manually, where for example you would track same values and store pointers on the same values (since this is very common state here). But I personally didnt have the need to implement something like this, as even on mobiles the memory usage was fine without compression.
I dont have such plans of implementing this. However if you manage to find something that works well and doesnt break general functionality of circular buffer, I am open to accept pull request :)
I actually did manage to implement DeflateStream in your code. I could send you the implementation once I find time. However, i switched from unity to Godot and life is so much better now. :)
Would it be feasable to think of implementing delta encoding or run-length encoding in the circular buffer to compress the data?