String Compression

给一个string, 求如何in-place的压缩, 返回改后数组的大小. 用双指针法, 一个指针write指向数组的写入点, 另一个read指向数组的读取点.