'Read and return an integer argument *nbytes* long.
Signedness is determined by the *signed* keyword.'

def _arg(self, nbytes, signed=False):

    str = self.file.read(nbytes)
    value = ord(str[0])
    if (signed and (value >= 128)):
        value = (value - 256)
    for i in range(1, nbytes):
        value = ((256 * value) + ord(str[i]))
    return value
