String calcSize/encoding optimisations.