Add segment_kernel_with_data function which acts like segment_kernel function but the parameter is seg_data itself other than seg_file path, so the users can parse the file content themselves and generate segments.
Add load_segment_from_data function which acts like load_segment but the parameter is seg_data itself other than seg_file path.
Add get_split_segments function which acts like split_segment but the users can get the segments so they can save segments as they want.