Skip to content

Commit

Permalink
Format example better
Browse files Browse the repository at this point in the history
  • Loading branch information
bytesiz3d committed Feb 15, 2024
1 parent e7fcb56 commit a2ea1d2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a2ea1d2

Please sign in to comment.