Finally got it to find best byte size correctly

Kind of in a workingish state. (Won’t actually work, but algorithm kind
of almost working)