public static Bencode ( object>.IDictionary | ||
map | object>.IDictionary | |
s | Stream | |
return | void |
public static void Bencode(IDictionary<object, object> map, Stream s)
{
s.WriteByte(MapMarker);
var keys = map.Keys;
foreach (var key in keys)
{
Bencode((string)key, s);
Bencode(map[key], s);
}
s.WriteByte(EndMarker);
}