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

Function CPLGetCompressor

port/cpl_compressor.cpp:1925–1941  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1923 * @since GDAL 3.4
1924 */
1925const CPLCompressor *CPLGetCompressor(const char *pszId)
1926{
1927 std::lock_guard<std::mutex> lock(gMutex);
1928 if (gpCompressors == nullptr)
1929 {
1930 gpCompressors = new std::vector<CPLCompressor *>();
1931 CPLAddBuiltinCompressors();
1932 }
1933 for (size_t i = 0; i < gpCompressors->size(); ++i)
1934 {
1935 if (EQUAL(pszId, (*gpCompressors)[i]->pszId))
1936 {
1937 return (*gpCompressors)[i];
1938 }
1939 }
1940 return nullptr;
1941}
1942
1943/** Return a decompressor.
1944 *

Callers 11

TEST_FFunction · 0.85
testMethod · 0.85
InitFromConfigurationMethod · 0.85
CreateMDArrayMethod · 0.85
InitFromConfigurationMethod · 0.85
InitFromConfigurationMethod · 0.85
CreateMDArrayMethod · 0.85
FlushDirtyBlockMethod · 0.85
LoadArrayMethod · 0.85
InitMetadataMethod · 0.85

Calls 3

CPLAddBuiltinCompressorsFunction · 0.85
EQUALFunction · 0.50
sizeMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
testMethod · 0.68