@@ -35,7 +35,7 @@ copy `include/bencode.hpp` to your destination of choice.
35
35
36
36
### Data types
37
37
38
- Bencode has four data types: ` integer ` s , ` string ` s , ` list ` s, and ` dict ` s . These
38
+ Bencode has four data types: ` integer ` , ` string ` , ` list ` s, and ` dict ` . These
39
39
correspond to ` long long ` , ` std::string ` , ` std::vector<bencode::data> ` , and
40
40
` std::map<std::string, bencode::data> ` , respectively. Since the data types are
41
41
determined at runtime, these are all stored in a variant type called ` data ` .
@@ -56,7 +56,7 @@ auto value = boost::get<bencode::integer>(data);
56
56
auto data = bencode::decode(foo.begin(), foo.end());
57
57
```
58
58
59
- Finally, you pass an ` std::istream ` directly to ` decode ` . By default, this
59
+ Finally, you can pass an ` std::istream ` directly to ` decode ` . By default, this
60
60
overload will set the eof bit on the stream if it reaches the end. However, you
61
61
can override this behavior. This is useful if, for instance, you're reading
62
62
multiple bencoded messages from a pipe:
@@ -102,7 +102,7 @@ bencode::encode(std::cout, bencode::dict{
102
102
});
103
103
```
104
104
105
- As with encoding, you can use the ` _view ` types if you know the underlying
105
+ As with encoding, you can use the ` * _view` types if you know the underlying
106
106
memory will live until the encoding function returns.
107
107
108
108
## License
0 commit comments