major speedup by not reading the file fully each iteration for each time, as the offset doesn't change.
prefer to use text content where possible, although pkg defaults to blob only for normal sources, there's an option to store both blob and text (and dependencies sometimes have only text), so let's default to text so it's more readable.
possibly add --prefer-blob to use the old behaviour if that's needed by anyone.