Hi friends,
I want to get some of the routines which allows me to access any files from compressed zip file.
For Example : If test.zip file contains four files 1,2,3 and 4 then I should able to ACCESS data of all the four files in C language without decompressing it. How can I do it? Are their any free routines OR functions available? If not, then how can we build such functions ?
Thanks,
Vipul
Comments
: I want to get some of the routines which allows me to access any files from compressed zip file.
: For Example : If test.zip file contains four files 1,2,3 and 4 then I should able to ACCESS data of all the four files in C language without decompressing it. How can I do it? Are their any free routines OR functions available? If not, then how can we build such functions ?
:
: Thanks,
: Vipul
:
I think zlib might help you
http://www.gzip.org/zlib/
: : I want to get some of the routines which allows me to access any files from compressed zip file.
: : For Example : If test.zip file contains four files 1,2,3 and 4 then I should able to ACCESS data of all the four files in C language without decompressing it. How can I do it? Are their any free routines OR functions available? If not, then how can we build such functions ?
: :
: : Thanks,
: : Vipul
: :
:
: I think zlib might help you
:
: http://www.gzip.org/zlib/
:
I have refered to above link previously also But I think that Zlib is just good algorithm for compression-decompression. What I want to do is:
I already have one compressed file (For Eg: test.zip which contains 1.txt,2.txt) and I want to access datas(in one of my C program) of 1.txt and 2.txt files which are in TEST.ZIP WITHOUT decompressing it. How can I access that? Is their any utility/library/routines provided by anybody? How Can we write it?
: : : I want to get some of the routines which allows me to access any files from compressed zip file.
: : : For Example : If test.zip file contains four files 1,2,3 and 4 then I should able to ACCESS data of all the four files in C language without decompressing it. How can I do it? Are their any free routines OR functions available? If not, then how can we build such functions ?
: : :
: : : Thanks,
: : : Vipul
: : :
: :
: : I think zlib might help you
: :
: : http://www.gzip.org/zlib/
: :
:
: I have refered to above link previously also But I think that Zlib is just good algorithm for compression-decompression. What I want to do is:
: I already have one compressed file (For Eg: test.zip which contains 1.txt,2.txt) and I want to access datas(in one of my C program) of 1.txt and 2.txt files which are in TEST.ZIP WITHOUT decompressing it. How can I access that? Is their any utility/library/routines provided by anybody? How Can we write it?
:
:
I think the file has to be decompressed first.
1)
You want to get the compressed data of one of the text-files. So you would have to open the zip file parse the header to know at which offset the data for '1.txt' begins and then read only that part. But I don't think that would make much sense.
2)
Since you can't access data of a compressed file without decompressing it, you probably mean you want to access the data without saving it on hard-disk. So you have to simply decompress the file into memory. I don't know if zlib can do this, but I would be surprised if not. Take a look at the documentation.
www.wotsit.org
search for zip.
I tried this in QBASIC some years ago but couldn't
extract the compressed data so I don't know if I succeded.
[hr]
El PROgrammador Niklas Ulvinge
(who doesn't know how to spell in inglish)
:
Sorry, I think I'm wrong. It wasn't zip.
It was something else. I can't really
remember but I remember that it went fine
until I should extract it.
[hr]El PROgrammador Niklas Ulvinge
(who doesn't know how to spell in inglish)
[red]Let the burning foxes stop the explorer.[/red]