In order to do this, you can use a while loop to continuously fill the buffer and have an if-statement check whether the buffer is full. If it is full, you can run the desired processing in the if statement and then continue filling after the if statement is completed. The while loop can continue to run for however many iterations you would like.
A sample file is attached. Please note this is simplified code just demonstrating the concept described above and does not necessarily account for edge cases nor optimization.
Best Answer