small change to flush work space. writing new frags is broken rn

This commit is contained in:
Green Sky 2024-04-02 17:48:15 +02:00
parent 8d0518c2e3
commit 84bd24807d
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,11 @@ File2ZSTDW::File2ZSTDW(File2I& real) :
ZSTD_CCtx_setParameter(_cctx.get(), ZSTD_c_checksumFlag, 1); // add extra checksums (to frames?) ZSTD_CCtx_setParameter(_cctx.get(), ZSTD_c_checksumFlag, 1); // add extra checksums (to frames?)
} }
File2ZSTDW::~File2ZSTDW(void) {
// flush remaining data (and maybe header)
// actually nvm, write will always flush all data, so only on empty files this would be an issue
}
bool File2ZSTDW::isGood(void) { bool File2ZSTDW::isGood(void) {
return _real_file.isGood(); return _real_file.isGood();
} }

View File

@ -15,7 +15,7 @@ struct File2ZSTDW : public File2I {
std::unique_ptr<ZSTD_CCtx, decltype(&ZSTD_freeCCtx)> _cctx{ZSTD_createCCtx(), &ZSTD_freeCCtx}; std::unique_ptr<ZSTD_CCtx, decltype(&ZSTD_freeCCtx)> _cctx{ZSTD_createCCtx(), &ZSTD_freeCCtx};
File2ZSTDW(File2I& real); File2ZSTDW(File2I& real);
virtual ~File2ZSTDW(void) {} virtual ~File2ZSTDW(void);
bool isGood(void) override; bool isGood(void) override;