Using unrar library - extracting files into a filestream buffer

后端 未结 3 1922
陌清茗
陌清茗 2021-02-03 14:20

What I need is to be able to extract the files in a .rar file into streams. I\'m creating a test case to get a sense of how to use unrar source. I\'ve been searching and tinkeri

相关标签:
3条回答
  • 2021-02-03 14:29

    I can't find any docs online either, but there are examples you can use:

    Go to http://www.krugle.com, and in the lower left corner of the page, enter a keyword like RAROpenArchiveEx. You'll see header and source files from various open source projects that make use of unrar library.

    That should get you going.

    0 讨论(0)
  • 2021-02-03 14:41

    I'm not familar with unrar, after quick reading of a documentation I think you are assuming that CallbackProc is called exactly once per file. However, I think unrar may call it multiple times. It unpacks some data then calls CallbackProc, then unpacks next data chunk and again calls CallbackProc, the process is iterated until all data is processed. You should remember how many bytes are actually written to buffer, and append new data at corresponding offset.

    0 讨论(0)
  • 2021-02-03 14:50

    You seem to have posted some source-code, but no actual question.

    Have you considered looking at Rarlabs Feedback Page (which points to their forums

    Also, see: This Article

    0 讨论(0)
提交回复
热议问题