final_data = fileInMemory[0:self.offset] + output + fileInMemory[self.offset+self.length:]