There is a small bug here. If source.size() % chunk_count != 0, chunk_size will be the reminder at the last iteration, and it will produce a wrong offset in the source pointer.
The issue can be reproduced when compressing more dispersed data than the given source vector.
Hi @barabanshek, thanks for reporting it, that's definitely should be fixed on our side!
I've noticed another issue with similar examples, so will address both shortly and close your PR when addressed.
Description
There is a small bug here. If source.size() % chunk_count != 0, chunk_size will be the reminder at the last iteration, and it will produce a wrong offset in the source pointer.
The issue can be reproduced when compressing more dispersed data than the given
source
vector.Checklist
N/A since it's a small bug in the examples.