fix szfile and szarray values

replace 0xffffffff with typemax(Uint32)
add a test with a larger offset than 64k
use div(a, b) instead of ifloor(a/b)