Use ptrsize instead of assuming
Slight improvement for readIntSlice
Extract function to set slice len