How to Access Data Of Compressed File

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

  • : 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
    :

    I think zlib might help you

    http://www.gzip.org/zlib/
  • : : 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
    : :
    :
    : 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?

  • : : : 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
    : : :
    : :
    : : 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.
  • I don't think it's clear what you mean. There are two possibilities:

    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.
  • A good site:
    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)

  • From what I gather you are attempting to uncompress one file of a series, the only ways to do this are to learn the syntax of the compression program, use that to find where each file is stored, open only the sections belonging to the file you wish to open, uncompress them, then save them into a seperate file, a lot of work for such a lowly result.
  • : From what I gather you are attempting to uncompress one file of a series, the only ways to do this are to learn the syntax of the compression program, use that to find where each file is stored, open only the sections belonging to the file you wish to open, uncompress them, then save them into a seperate file, a lot of work for such a lowly result.
    :
    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]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories