cumulative_split_code function

Use cumulative split coding