Add compression buffer for synchronous compression

This commit is contained in:
Martin 2022-01-22 12:28:36 +01:00
parent f5d8bce2bb
commit 77dda1c039

View File

@ -68,7 +68,7 @@ CompressedFile::CompressedFile( std::string pFilename, int pMode, size_t n_threa
blocksize = c_cacheBuffersize;
writeHeader();
hotCache.reset(new LRUMemCache(blocksize, c_ncacheItems, n_threads));
initCompressedBuffers(n_threads);
initCompressedBuffers(n_threads + 1);
}
if(hotCache.get())
@ -93,7 +93,7 @@ CompressedFile::CompressedFile(IFile* file, bool openExisting, bool readOnly, si
blocksize = c_cacheBuffersize;
writeHeader();
hotCache.reset(new LRUMemCache(blocksize, c_ncacheItems, n_threads));
initCompressedBuffers(n_threads);
initCompressedBuffers(n_threads + 1);
}
if(hotCache.get()!=nullptr)
{