mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Struggling trying to make BrotliEncoderCompress on a ESP32 microprocessor #294
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @martinberlin on GitHub (Sep 30, 2019).
Hello I've forked some time ago this great library since I wanted to decompress incoming data in the ESP32. This worked great and it was the first mission trying Brotli.
It takes about 1 millisecond to decompress 26 bytes
Now I wanted to make the opposite example, to read a small file and try to use BrotliEncoderCompress and in this part is the one I'm failing:
https://github.com/martinberlin/brotli/blob/feature/compress/tests/src/main.cpp
Can you please provide a code snippet or working example using this method?
I guess it can be related to my failure that:
1.- The ESP32 needs time to do it's WiFi stuff, so it can be that is struggling with it
2.- Is using too much memory and cannot allocate enough (But I don't think that is the case)
The code is just opening a file and reading the bytes in a buffer. Maybe is easier to see here that I'm doing something wrong:
I will be very happy if I can make the compression part working in this internet of the things devices. Thanks in advance for any advice.
@martinberlin commented on GitHub (Oct 5, 2019):
Is working!
https://github.com/martinberlin/brotli/tree/feature/compress
If you have a recommendation in how to make the quality major than 1 I will be very happy. Just feel free to close this issue. Thank you very much for this great library.