Skip to content

Commit 4246a2c

Browse files
committed
docs: document list command in README
1 parent 864b24d commit 4246a2c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ See [FORMAT.md](FORMAT.md) for the binary format specification.
1212
## Library Usage
1313

1414
```rust
15+
// List entry names without reading content
16+
let names: Vec<String> = brarchive::list(&bytes)?;
17+
1518
// Deserialize- collect into any type that implements FromIterator<(String, String)>
1619
let map: std::collections::BTreeMap<_, _> = brarchive::deserialize(&bytes)?;
1720
let vec: Vec<(String, String)> = brarchive::deserialize(&bytes)?;
@@ -47,4 +50,10 @@ brarchive-cli decode path/to/pack --recursive
4750

4851
# Delete archive after decoding
4952
brarchive-cli decode output.brarchive path/to/out/ --delete-source
53+
54+
# List entry names in an archive
55+
brarchive-cli list output.brarchive
56+
57+
# List entries in all archives under __brarchive/ recursively
58+
brarchive-cli list path/to/pack --recursive
5059
```

0 commit comments

Comments
 (0)