bitbank2 / unzipLIB

An embedded-friendly library for decompressing files from zip archives
Apache License 2.0
52 stars 11 forks source link

must use RAM 41K,can not save some? #14

Closed xianyo closed 11 months ago

xianyo commented 11 months ago

must use RAM 41K,can not save some?

maybe can 32K to 16K?

change MAX_WBITS or other。。

bitbank2 commented 11 months ago

FLATE by default uses a 32K sliding window for best compression. The compressor can choose to use a smaller window and then the decompressor will require less RAM. If you want to be able to decode any ZIP file, then you need to allocate sufficient memory. I could allocate the memory dynamically, but the reason I did it this way is for very simple embedded targets with no malloc/free functionality. You're free to change it as you wish for your needs.