[gdal-dev] Memory mapped VSILFILE ?

Even Rouault even.rouault at spatialys.com
Tue Sep 5 00:40:48 PDT 2023


Andrew,

cf CPLVirtualMemFileMapNew() ( 
https://gdal.org/doxygen/cpl__virtualmem_8h.html#a02ab08b2cf138fa69d076ccd81eda3cb 
) which was an implementation step of 
https://gdal.org/development/rfc/rfc45_virtualmem.html

RawRasterBand::GetVirtualMemAuto() 
(https://github.com/OSGeo/gdal/blob/83425621471d4987087317999d6fff3a482da88f/gcore/rawdataset.cpp#L1522) 
may be of interest

Even

Le 05/09/2023 à 08:39, Andrew C Aitchison a écrit :
>
> Drivers work with VSILFILE objects.
> Sometimes these are real files but as I understand it,
> sometimes these are actually blocks of memory behind a file interface.
>
> Is the reverse possible, ie can I mmap a VSILFILE and then
> read it as if it were a block of memory ?
> This would be for read-only drivers.
>
> There will inevitably be endian issues, but I have come across
> several file formats that look to me to be designed to be read
> this way, especially the header structures.
>
> Thanks,
>
-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list