Closed baloyou closed 7 months ago
@madler: Can you look this ticket?
@madler: Can you look this ticket?
Can I decompress in segments when I run out of memory? (Does the memory have to be larger than the full data)
Yes, but if you decompress in chunks, then you need 32K of memory to save the sliding window for decompression. inflate()
will only try to allocate that 32K if it cannot complete the decompression in a single call.
Can I decompress in segments when I run out of memory? (Does the memory have to be larger than the full data)
I use this library (1.3) (esp8266+arduino) on my microcontroller to decompress the requested API data (the raw data is gzip compressed)
I used the following code, and when the raw data is small, everything works fine. However, if the original data exceeds the settings of inputbuffer and outputbuffer, decompression will fail.
This code returns Z_MEM_ERROR
I can't expand the values of inputbuffer and outputbuffer because ESP8266 has limited memory space (can only be set up to 512)
How can I solve this problem?
I'm sorry, but I don't know much about gzip's data format.
full code: