Resize original buffer to a given range using given range, filling additional segments with defaultValue. Range left border could be negative to designate adding new blank segment to the beginning of the buffer