MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLGetDecompressor

Function CPLGetDecompressor

port/cpl_compressor.cpp:1949–1965  ·  view source on GitHub ↗

Return a decompressor. * * @param pszId Decompressor id. Should NOT be NULL. * @return compressor structure, or NULL. * @since GDAL 3.4 */

Source from the content-addressed store, hash-verified

1947 * @since GDAL 3.4
1948 */
1949const CPLCompressor *CPLGetDecompressor(const char *pszId)
1950{
1951 std::lock_guard<std::mutex> lock(gMutex);
1952 if (gpDecompressors == nullptr)
1953 {
1954 gpDecompressors = new std::vector<CPLCompressor *>();
1955 CPLAddBuiltinDecompressors();
1956 }
1957 for (size_t i = 0; i < gpDecompressors->size(); ++i)
1958 {
1959 if (EQUAL(pszId, (*gpDecompressors)[i]->pszId))
1960 {
1961 return (*gpDecompressors)[i];
1962 }
1963 }
1964 return nullptr;
1965}
1966
1967static void
1968CPLDestroyCompressorRegistryInternal(std::vector<CPLCompressor *> *&v)

Callers 12

OpenMethod · 0.85
TEST_FFunction · 0.85
testMethod · 0.85
GDALRegister_LIBERTIFFFunction · 0.85
InitFromConfigurationMethod · 0.85
CreateMDArrayMethod · 0.85
InitFromConfigurationMethod · 0.85
InitFromConfigurationMethod · 0.85
LoadBlockDataMethod · 0.85
IAdviseReadMethod · 0.85
LoadArrayMethod · 0.85

Calls 3

EQUALFunction · 0.50
sizeMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
testMethod · 0.68