import typing


def file_range(f: typing.BinaryIO, data: bytes) -> slice:
	"""Given a file and data read from that file, return a slice representing the range that was just read from it.
	No slice attributes will be None. Step will always be 1.
	"""
	cur_pos = f.tell()
	start_pos = cur_pos - len(data)
	return slice(start_pos, cur_pos, 1)