unsigned is a 32-bit integer (even on 64-bit platforms). File sizes are generally measured in 64-bit integers and using 32-bit integers or architecture-dependent integers is brittle and confusing.
So use u64 consistently for flatfile sizes in this refactor.
Also, use LARGE_INTEGER's QuadPart on Windows, which is recommended since C++11.
Also, unit test VarInt overflow errors.