Question: Using Brotli in embedded devices
- Dominant language
- TypeScript
- Stars
- 14.9k
- Forks
- 1.4k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
We are trying to use Brotli in [Sming Framework](https://github.com/SmingHub/Sming) ( an embedded framework for a microprocessor with limited RAM and CPU).
We would like to use only the decompression functionality to decompress on the-fly incoming HTTP data. The brotli-encoded data comes in chunks of variable sizes from 512 to 1024. For the output we have allocated 3K buffer that is fetched and cleared after every chunk is decompressed.
The most important part of the code that we use can be found here: https://github.com/slaff/Sming/blob/feature/httpclient-content-decoders/Sming/SmingCore/Data/Coder/Decoder.cpp. In our tests under Linux all works fine.
BUT
The problem that we experience when running it on the microcontroller is that `brotli` tries to allocate 16K RAM ( to be precise 16K + 56 bytes), which is luxury for an embedded device and we rarely have so much RAM available. Are there any compiler directives that we can use to instruct it to use minimal RAM ?
Contributor guide
Assessment
This issue has not been assessed yet.