1
0
Fork 0
forked from len0rd/rockbox

zip: implement zip extraction support

This adds code sufficient to extract files to available storage given a
suitable root directory to extract to. It works on an already open zip
handle and also supports chain-loading a secondary callback in the event
that integration into the process is desired.

Change-Id: Id200d8f20d84a0cbd22906470de8bbd21d4525ef
This commit is contained in:
James Buren 2021-07-11 05:14:20 +00:00
parent a1bcca645b
commit 8846e087c0
2 changed files with 182 additions and 0 deletions

View file

@ -58,6 +58,10 @@ int zip_read_shallow(struct zip* z, zip_callback cb, void* ctx);
// this can also pickup where a successful shallow read leftoff
int zip_read_deep(struct zip* z, zip_callback cb, void* ctx);
// extract the contents to an existing directory
// this can also pickup where a successful shallow read leftoff
int zip_extract(struct zip* z, const char* root, zip_callback cb, void* ctx);
// returns system resources
void zip_close(struct zip* z);