Skip to content

Commit e9e7a59

Browse files
committed
update readme about updated list commandf
1 parent 8eb0a4c commit e9e7a59

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ zipserver <command> --help # Show help for a specific command
5656
| `extract` | Extract a zip file to storage | Source read, optional target write |
5757
| `copy` | Copy a file to target storage | Source read, target write |
5858
| `delete` | Delete files from storage | Target write |
59-
| `list` | List files in a zip archive | Source read (or URL) |
59+
| `list` | List files in a zip archive | Source read, URL, or local file |
6060
| `slurp` | Download a URL and store it | Source write, or optional target write |
6161
| `testzip` | Extract and serve a local zip file via HTTP for debugging | local only |
6262
| `dump` | Dump parsed config and exit | n/a |
@@ -136,22 +136,29 @@ curl -X POST "http://localhost:8090/delete" \
136136

137137
## List
138138

139-
List files in a zip archive without extracting.
139+
List files in a zip archive without extracting. Returns JSON with filenames and uncompressed sizes.
140140

141141
**CLI:**
142142
```bash
143-
# From storage
143+
# From storage (uses efficient range requests - only reads zip metadata)
144144
zipserver list --key zips/my_file.zip
145145

146-
# From URL
146+
# From URL (downloads entire file)
147147
zipserver list --url https://example.com/file.zip
148+
149+
# From local file
150+
zipserver list --file ./local.zip
148151
```
149152

153+
When using `--key`, zipserver uses HTTP range requests to read only the zip's central directory (typically < 1% of the file size). This significantly reduces bandwidth and storage operation costs for large zip files.
154+
150155
**HTTP API:**
151156
```bash
152157
curl "http://localhost:8090/list?key=zips/my_file.zip"
153158
```
154159

160+
The HTTP API also uses range requests when listing by key.
161+
155162
## Slurp
156163

157164
Download a file from a URL and store it in storage.

0 commit comments

Comments
 (0)