Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fix in #240 only addressed a specific issue, regarding repeated sequences of strings with no whitespace that were exact multiples of the maximum allow chunk size. It just moved the problem to another offset instead.
This does instead fix the real underlying issue and fixing one oddity with previous implementation (why a text string that were the same length as the chunk size would not fit inside one chunk).
Additionally, this includes a test iterating through 8000 text lengths and verifying the contents as well as the chunk sizes.
The general problem with the test is that the logic for calculating the expected sizes works the same way as the implementation. But matched with the unaligned limits and iteration, it should verify the logic sufficiently.
Fixes #244.