shannon fano encode position. Modified code to find correct encoding based on trouve_separation