Behave similar to chunk and throw a RuntimeException if the window size is not positive.