2022-12-03 12:40:36 +05:00
|
|
|
package zkv
|
|
|
|
|
2022-12-03 20:59:17 +05:00
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
|
|
|
|
"github.com/klauspost/compress/zstd"
|
|
|
|
)
|
2022-12-03 12:55:42 +05:00
|
|
|
|
2022-12-03 12:40:36 +05:00
|
|
|
var defaultOptions = Options{
|
2022-12-03 20:59:17 +05:00
|
|
|
MaxParallelReads: runtime.NumCPU(),
|
2022-12-03 12:55:42 +05:00
|
|
|
CompressionLevel: zstd.SpeedDefault,
|
2022-12-09 20:05:30 +05:00
|
|
|
MemoryBufferSize: 4 * 1024 * 1024,
|
|
|
|
DiskBufferSize: 1 * 1024 * 1024,
|
2022-12-10 21:39:24 +05:00
|
|
|
UseIndexFile: false,
|
2022-12-03 12:40:36 +05:00
|
|
|
}
|
2022-12-10 21:39:24 +05:00
|
|
|
|
|
|
|
const indexFileExt = ".idx"
|