Reads a custom sized binary integer value from the file. This method returns a negative value if it fails.