atomicobject / heatshrink

data compression library for embedded/real-time systems
ISC License
1.31k stars 176 forks source link

Allow decoder to point at a (large) rom buffer and pull directly from it to get data. #50

Open snoonan opened 6 years ago

snoonan commented 6 years ago

I have a large (30k) compressed image in rom, that is directly addressable and would like to not have to keep sink'ing into the state buffer by memcopy.

This was done by splitting the buffer into two pointers, and making a new routine that lets the user override the internal buffer to point to the rom (or other large buffer) location directly.

silentbicycle commented 3 years ago

I agree that making it possible to do zero-copy encoding/decoding is a good idea, but we are planning on making more substantial architectural changes to support it in the 0.5.0 release.