def _read(fh, num_bytes):
    """ Reads a number of bytes, throwing an exception if that many bytes isn't
		available.
	"""
    result = fh.read(num_bytes)
    if len(result) != num_bytes:
        raise IOError('Unexpected end-of-file.')
    return result
