/KDBencoding

Decoder for the Bencoding format used in the BitTorrent protocol

Primary LanguageObjective-CApache License 2.0Apache-2.0

KDBencoding

A simple Objective-C decoder for the Bencoding format used in the BitTorrent protocol http://en.wikipedia.org/wiki/Bencode

NSData* data = [NSData dataWithContentsOfFile:torrentFilePath];
if(!data) {
  // handle file not loaded error
}
KDBencodingParser* parser = [KDBencodingParser parserWithData:data];
if(!parser) {
  // handle parse error
}
NSLog(@"%@", parser.rootObject);