trivial string gap compression implementation