Memory issues Decompressing a large compressed array #15090
-
Memory allocation is a big problem on the PICO because of fragmentation. There is plenty of memory, but all in small scattered chunks. I need to make an HL7 FHIR Bundle message which is a huge JSON string. So to do that I preallocate a buffer as a memoryview and create the bytearray piecemeal and load that into the buffer. However, some messages can still get too large so I use a preallocated BytesIO(fixed_size) and use deflate.DeflateIO to write a compressed version of this message. Now what I would like to do is check it. I tried an approach like this:
but at runtime I get that the line |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
it may be related to the window size, see https://docs.micropython.org/en/latest/library/deflate.html#deflate-window-size |
Beta Was this translation helpful? Give feedback.
it may be related to the window size, see https://docs.micropython.org/en/latest/library/deflate.html#deflate-window-size