Fix chunks so it retains a final partial chunk. Preserve empty-input and size validation behavior. Make the smallest correct change and run the tests.
