4 ms·
To get an idea on how to deal with ZIP files in code: — in C, minimal-style library: https://github.com/richgel999/miniz https://github.com/richgel999/miniz, l
by palsecam 5y ago
To get an idea on how to deal with ZIP files in code:
— in C, minimal-style library: https://github.com/richgel999/miniz https://github.com/richgel999/miniz, look especially at https://github.com/richgel999/miniz/blob/master/miniz_zip.h https://github.com/richgel999/miniz/blob/master/miniz_zip.h
— in JS, writing only and no compression: https://github.com/PaulCapron/pwa2uwp/blob/master/src/zip.js https://github.com/PaulCapron/pwa2uwp/blob/master/src/zip.js (255 lines including blanks & comments)
- jart 5y agoYou can also read the redbean source code, since it's the web server that reads/writes to its own executable zip file as a native process. https://github.com/jart/cosmopolitan/blob/f3e28aa192d433c379b86df00d760d87da25a487/tool/net/redbean.c#L3246 https://github.com/jart/cosmopolitan/blob/f3e28aa192d433c379... Some ZIP APIs are designed in such a way that you can even use the POPCNT instruction to decode them.