Basic Bencode implementation