def chunkReader(file_reference, chunk_size=1024):
    """
    A generator that reads a file chunk by chunk
    :param file_reference: Reference to the file object
    :param chunk_size: The size of chunk that needs to be read
    :return: The chunk of the file read
    """
    while True:
        chunk = file_reference.read(chunk_size)
        if not chunk:
            return
        yield chunk
