added BtreeSet encode/decoder