Added BEncode encoder and partial decoder