imageSize() gets the image size from the bytes we added in the signature, archiveSize() get's the size of the archive without the 8 bytes.
I'll test your code to see if it works. Edit: yes it worked xD
Now over to the RAR issue
RAR error: http://pastebin.com/m779c0a33
unRar is called...