Utilise a binary search algorithm for the pack_text function. It's still by-far the most
time-consuming aspect of this process, but in order to fix it any more than this I'm going to
have to think for a bit.