integer_fread implementation