OptionalcompactOptionalcompactOptionalcomparatorOptionalcontextOptionaldeletedOptionaldeletedOptionalerrorOptionalisOptionallastOptionallogOptionalnewOptionalnewOptionalnewOptionalnewOptionalnewOptionalnextOptionalpreviousGet the file index for lazy loading
Get whether lazy loading mode is enabled
Get the number of keys currently in memory
Optionalcontext: stringOptionalvisitorState: ILevelDbRecordVisitorStateOptionalcontext: stringClear all loaded keys and reset to just the index metadata. Useful for freeing memory after processing a world.
Get a key's value, loading the containing file if necessary (lazy mode). In non-lazy mode, this is a simple map lookup.
The key to retrieve
The LevelKeyValue, false (if deleted), or undefined (if not found)
Optionaloptions: { unloadFilesAfterParse?: boolean }Initialize in lazy loading mode - only loads manifest metadata. Files are loaded on-demand when keys are requested.
This dramatically reduces initial memory usage for large worlds. Call loadAllFiles() to fully load everything, or use getKey() for on-demand loading.
Optionaloptions: ILevelDbInitOptionsLoad all files in lazy mode. This is useful after initLazy() when you want to fully populate all keys (e.g., for world enumeration).
Optionaloptions: {Options for loading
The number of keys loaded
Load a specific file's keys into memory. Used for on-demand loading in lazy mode.
Parse a new or modified LDB/LOG file and return the chunk coordinates affected. This is used for incremental updates when the file system detects new files.
The LDB or LOG file to parse
Array of unique chunk coordinates affected by keys in this file
Optionalcontext: stringOptionalcontext: stringOptionalvisitorState: ILevelDbRecordVisitorStateOptionalcontext: stringOptionalvisitorState: ILevelDbRecordVisitorStateOptionalcontext: stringOptionalvisitorState: ILevelDbRecordVisitorStateOptionalcontext: string
If provided, logs will go through here. If not present, it will default to console logs. To disable all logging, pass an empty object
{}.