I have tried finding the solution for the problem on google but unable to find a solution that supports both the Archive formats i.e Rar/Zip.I tried with 7zip [7zip][1] but it has functions thar compress/decompress or extracts the contents of Archive files , While searching for the solution I found minizip supports both the formats Rar/Zip with [minizip][2]
I tried to open the text file inside Archive,but it's unable to open it.
Possibly I am looking forward to [zlib][3] as a possible approach but it is a dll,and I dont know about how its functions work and do they perform the task of reading from a text file inside the Archive.
So, please give guidance as how to move ahead in this task, i am not sure with zlib.
**Making the requirement clear again**
I just want to read the content of text files inside archive (rar/zip) For e.g I have Archive C:\Test.rar and Test.rar contains filesample.txt , so my requirement is to read the content of filesample.txt directly ,I dont want to extract the files.
unrar and zlib does support extracting files as a stream, in fact all archiving libraries does support that.
At least unrar decompress the files inside archive chunk by chunk, using a user defined callback function where you can process uncompressed data, including doing nothing.