def EORLE(self,*arg):
		""" 00 01: End Of RLE Data, Writing Decoded File """
		self.EORLED = True
		self.EOSL()
		if not self.buf == "": self.tmp.write(self.buf)

		self.tmp.seek(0)
		self.dec = self.tmp.read()
		self.tmp.close()

		self.i.seek(0)
		self.o.write(self.i.read(2)) #'BM' signature

		fs = self.offset + len(self.dec) #FileSize: (Header + Color Palette) + ImageData
		fsize = "" #filesize string value
		for i in range(4): fsize+=chr((fs & (0xFF<<8*i))>>8*i)#ordering as little-endian
		self.o.write(fsize)

		self.i.seek(6)
		self.o.write(self.i.read(24))#writing 24-byte same data from 6 offset

		self.o.write('\x00\x00\x00\x00')#compression-type: none

		imgdsize = ""#image data size string value
		for i in range(4): imgdsize+=chr((len(self.dec)&(0xFF<<8*i))>>8*i)
		self.o.write(imgdsize)

		self.i.seek(38)
		self.o.write(self.i.read(self.offset-38))#writing left same data from 38

		self.o.write(self.dec)

		self.o.close()
		self.i.close()
 00 01: End Of RLE Data, Writing Decoded File 
recipes/Python/577379_BIRLE_Decoder/recipe-577379.py