gzip anyone?

Linux specific forum
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

gzip anyone?

Post by GBeebe »

I thought I saw this once, but after searching the forums I haven't been able to find it. What I'm looking for is sample code that will let you let you extract a file (by name) from a zip into memory. The only thing I've been able to find, however, code to use wrappers that use gzip instead of actual code that uses gzip directly. I would have sworn I saw it here in the linux forums, but searching for "zip" turns up nothing and searching for "gzip" doesn't turn up much. I'm sure someone has this sitting on their harddrive and I would love to see it.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: gzip anyone?

Post by Trond »

gzip
extract a file (by name) from a zip into memory
Zip or gzip? You know gzip can't contain multiple files, right? So you can't extract "one of the files" in it, as there is only one (usually a tar file, which can contain multiple files, but offers no compression on its own).
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: gzip anyone?

Post by IdeasVacuum »

...you might be thinking of PureZip, but I think that is Windows only.....
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: gzip anyone?

Post by Trond »

You can use RunProgram() to call gzip and with the right parameters it will output to a pipe which can be read with ReadProgramData().
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

Re: gzip anyone?

Post by GBeebe »

I guess I didn't see it here then. I didn't figure it was going to be that easy. Looks like I have some research to do. Thank for the pointers guys.
Post Reply