[[PageOutline(2, Programming Languages)]] These snippets should be useful to read RAR archives with store compression (which means none compression is used). Feel free to edit/add source-codes if you have faster/better/new language implementation. Links: * http://www.unrarlib.org/ * http://www.rarlab.com/rar_add.htm * http://github.com/jphastings/unrar * http://github.com/johanlunds/rar_file (used in [http://code.google.com/p/undertext Undertext]) * http://libxad.cvs.sourceforge.net/viewvc/libxad/support/formats/RAR202.txt?revision=1.1&view=markup == Python == {{{ #(c)Kamil DziĆ³bek turbos11(at)gmail.com # BSD License from struct import * def getlastsplit(firsrarfile,x): if firsrarfile[-3:]=='001': return firsrarfile[:-3]+('%03d' %(x+1)) if firsrarfile[-11:-6]=='.part': return firsrarfile[0:-6]+('%02d' % (x+1))+firsrarfile[-4:] if firsrarfile[-10:-5]=='.part': return firsrarfile[0:-5]+('%1d' % (x+1))+firsrarfile[-4:] return firsrarfile[0:-2]+('%02d' %(x-1) ) def addfilehash(name,hash,seek): f=open(name, 'rb') f.seek(seek) for i in range(8192): hash+=unpack(' (size,hash)""" if not(firsrarfile.lower().endswith('.rar') | firsrarfile.endswith('.001')): raise Exception('Bad file suffix. Only .rar and .001 support.') if firsrarfile[-11:-6]=='.part': firsrarfile=firsrarfile[0:-6]+'01'+firsrarfile[-4:] f=open(firsrarfile, 'rb') a=f.read(4) if a!='Rar!': raise Exception('ERROR: This is not rar file.') seek=0 for i in range(4): f.seek(seek) a=f.read(100) type,flag,size=unpack( '