Added method to split the incoming data to appropriate chunk sizes.