Restored lost flatten example, vector buf => vector<char> buf