Hi, I have a data stream of f32s in a no_std context from the output of an AHRS fusion algorithm with accelerometer and gyroscope. I am going to transmit this data over cellular and I have relatively much RAM and CPU left over compared to transmit speed. So I would like to compress this data before transmitting it.
Ideally the compression should be lossless, but it doesn't absolutely have to be. So far the onlyno_std alternative I have found is:
but there must be other options out there! Does anyone have any recommendations. I'd be open to try porting or compiling a C library, if there isn't that much available in Rust yet.
It could be that data compression without allocations is just very complicated ^^
I guess you could try to reimplement one of the alloc ones to use a fixed size buffer as memory (compression could then fail), but at that point having an allocator might just be the easier solution. If you are very concerned about stability and prevent oom errors, maybe creating a PR to use the try_ versions for allocations (rather new stable rust feature) could help here.
Yes, I think it will be worth trying with alloc here, was hoping to avoid that. Think compression would be a big enough gain for this project. I am guessing that the allocation sizes will be pretty stable on fixed input buffers. Probably not a bigger problem than stack overflows anyway.