Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brotli compression #4

Open
ozanoner opened this issue Sep 20, 2021 · 4 comments
Open

brotli compression #4

ozanoner opened this issue Sep 20, 2021 · 4 comments
Assignees

Comments

@ozanoner
Copy link

brotliStatus = BrotliEncoderCompress(

Hi Martin, have you managed to run brotli compression? My app on ESP32 just crashes. I see that this project is quite old. I hope you can remember how it went.
Many thanks.

@ozanoner
Copy link
Author

Sorry, I just saw the other open issues here. Seems that it is successful, but did you have a chance to test it with a bigger chunk of data? I tried to compress 32KB data, but it is crashing with that size.

@martinberlin
Copy link
Owner

Sorry no idea. It’s hard to help you like this without any detailed error report, check how much free Heap you have. Try to compress a smaller file before.
Also check the buffer size. If the size is 30 Kb of course you won’t be able to decompress a 32 Kb file.
If that does not work just use miniz

@ozanoner
Copy link
Author

ozanoner commented Sep 21, 2021

I worked on not files but in-mem buffers. The latest buffer size was 4K but still no avail. Do you know if brotli lib uses dynamic mem? I checked with grep but nothing returned for alloc. And have you checked what is the mem footprint of internal structures? Can you refer to any info resource about this? Many thanks

@martinberlin
Copy link
Owner

No idea, try to dump freeHeap and see how much you have. Make sure the decompress buffer is big enough to hold the decompressed data. My tests worked using compression ratio 1, higher than that and it crashed. This was experimental that’s why I recommend miniz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants