liquidaty / zsv

zsv+lib: tabular data swiss-army knife CLI + world's fastest (simd) CSV parser
MIT License
210 stars 15 forks source link

Cleanup and modularize index #261

Closed richiejp closed 2 weeks ago

richiejp commented 2 weeks ago

Move the basic in-memory index functionality into utils and rework the API to make it easier to use. There is now a seek function which moves the file offset to the exact line-end requested by the user.

The temp file generation has not been moved into utils because generalising it started to introduced a lot more callbacks and other complications.

This also changes the sheet display code so that (building index) is displayed in the status area while indexing is in progress.