diff --git a/README.md b/README.md index d041063d..67075b3e 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,13 @@ int on_extract_entry(const char *filename, void *arg) { return 0; } +// From "foo.zip" on disk int arg = 2; zip_extract("foo.zip", "/tmp", on_extract_entry, &arg); + +// Or from memory +arg = 2; +zip_stream_extract(zipstream, zipstreamsize, "/tmp", on_extract_entry, &arg); ``` * Extract a zip entry into memory. @@ -203,12 +208,6 @@ zip_stream_close(zip); free(buf); ``` -* Extract an in-memory zip archive to a directory. - -```c -int ziperr = zip_stream_extract(zipstream, zipstreamsize, outdir, NULL, NULL); -``` - * List of all zip entries ```c