lava_torrent
is a library for parsing/encoding/creating bencode and .torrent files.
Read a torrent ([v1]) and print it and its info hash.
```rust use lava_torrent::torrent::v1::Torrent;
let torrent = Torrent::readfromfile("sample.torrent").unwrap(); println!("{}", torrent); println!("Info hash: {}", torrent.info_hash()); ```
Create a torrent ([v1]) from files in a directory and save the .torrent file.
```rust use lava_torrent::torrent::v1::TorrentBuilder;
let torrent = TorrentBuilder::new("announce".tostring(), "dir/", 1048576).build().unwrap(); torrent.writeinto_file("sample.torrent").unwrap(); ```
Please check the [documentation].
License: MIT OR Apache-2.0