add encoding functionality to bencoder util