Recently I decided to look further into the BitTorrent Protocol, as I have been fascinated by distributed systems (like peer-to-peer) and the communication protocols involved.
As I learnt more about how the protocol works, I thought it would be a good exercise to create a parser for the Bencode format — the format used to store and transfer metadata about a torrent file. My main goal was to create a simple program that is capable of constructing an internal representation of the Bencoded string and can output it in a nicer format (e.g. JSON).
Bencode is a relatively straight-forward encoding which has four different types:
Encoded as... Continue Reading...
|Date||July 27, 2016|
|Filename||2016-07-27-Bencode Parsing in Swift.md|
|Last Modified||Sun, 20 Oct 2019|
|Summary||Thoughts about using Swift to create a Bencode parser.|
|Tags||bencode, swift, parsing, personal, code|
|Title||Bencode Parsing in Swift|