What's the file structure of a rar file compressed in store mode

怎甘沉沦 提交于 2019-12-11 07:39:04

问题


I have many rars that a stored in store mode, that means they aren't compressed. I want to open them and read parts of the file that is "stored" in the rar. I think I can just open them if I knew the offset to the files.

Something in C# will do very well. I can't find anything on the web.


回答1:


The file format is publicly available, but I can't find it as text on their site.

When you install WinRAR, a text file with the technical information is put inside the Program Files WinRAR directory. You can also download "RAR for Linux" from the RAR download page and in that tar.gz file you can find the technote.txt file too:

          RAR version 4.00 - Technical information
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

THE ARCHIVE FORMAT DESCRIBED BELOW IS ONLY VALID FOR VERSIONS SINCE 1.50

ReScene is a project for recreating rar archives from the extracted files. You need a .srr file for this. The source code is available. You may want to take a look at RarStream.cs. That file is used in MKV/AVI ReSample: it can reconstruct a sample video file of a couple of megabytes using a .srs and the original video file, that can still be packed in split rar archives.

If you want something similar in other languages, I suggest you look at the unrar source from RarLab or at one of the following projects. They are open source and have the capabilities to play video files in RAR archives.

  • VLC media player
  • VLC UnRAR plugin – RAR player (for older versions)
  • XBMC

Other interesting projects:

  • RARFileSource (a DirectShow filter that lets most video players read RAR files on the fly)
  • rarfs (Fuse module to mount uncompressed RAR archives)

An other idea is to have a look at some comic book readers that support the .cbr format. This is just a rar archive with images stored in it.




回答2:


The file format is publicly available. Straight from the horse's mouth: RarLabs



来源:https://stackoverflow.com/questions/2039227/whats-the-file-structure-of-a-rar-file-compressed-in-store-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!