[gdal-dev] Support for reading GDAL datasets in compressed archives(.gz and .zip)

Even Rouault even.rouault at mines-paris.org
Wed Aug 27 14:28:51 EDT 2008


Frank is correct.

Let's suppose you have an archive archive.zip with the following content :


(After r15231), the behaviour of VSIReadDir and VSIStatL is similar to the 
behaviour of those functions as if archive.zip was a directory with its 
content at its base.

That is to say, you can do VSIReadDir("/vsizip/path/to/your/archive.zip") and 
it will return :

If you do VSIReadDir("/vsizip/path/to/your/archive.zip/dir1"), it will 
return :

And yes, the /vsigzip and /vsizip filesystems are read-only. No rename, 
deletion, write etc is possible.

Le Wednesday 27 August 2008 15:43:01 Frank Warmerdam, vous avez écrit :
> Baumann, Konstantin wrote:
> > Hi Even!
> >
> > That sounds cool. Is there also a function for retrieving all available
> > files inside of a ZIP archive?
> Kosta,
> Programatically this can presumably be accomplished with VSIReadDir()
> (aka CPLReadDir()).
> char CPL_DLL **VSIReadDir( const char * );
> The VSI filesystem operations should generally work on virtual
> file systems, though in the case of the zip driver I presume all the
> update operations (like VSIRename() or VSIUnlink()) are unimplemented.
> Best regards,

More information about the gdal-dev mailing list