collect offsets in multiple chunks rather than resizing a single array
added specialized methods for filling result