Struct OpenConfig¶
Defined in File zim.h
Struct Documentation¶
-
struct OpenConfig¶
Configuration to pass to archive constructors.
This struct contains options controlling the opening of a ZIM archive. For now, it is only related to preloading of data but it may change in the future.
Archive may eagerly preload certain data to speed up future operations. However, such preloading itself takes some time.
OpenConfig allows the user to define which data should be preloaded when opening the archive.
Public Functions
-
OpenConfig()¶
Default configuration.
Dirent ranges is activated.
Xapian preloading is activated.
-
inline OpenConfig &preloadXapianDb(bool load)¶
Configure xapian preloading.
This method modifies the configuration and returns itself.
-
inline OpenConfig preloadXapianDb(bool load) const¶
Configure xapian preloading.
This method creates a new configuration with the new value.
-
inline OpenConfig &preloadDirentRanges(int nbRanges)¶
Configure direntRanges preloading.
libzim will load
nbRanges + 1dirents to createnbRangesdirent ranges. This will be used to speed up dirent lookup. This is an extra layer on top of classic dirent cache.This method modifies the configuration and returns itself.
-
inline OpenConfig preloadDirentRanges(int nbRanges) const¶
Configure direntRanges preloading.
libzim will load
nbRanges + 1dirents to createnbRangesdirent ranges. This will be used to speed up dirent lookup. This is an extra layer on top of classic dirent cache.This method creates a new configuration with the new value.
-
OpenConfig()¶