diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/codecs/zstd_dict_codec.cpp | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/codecs/zstd_dict_codec.cpp')
-rw-r--r-- | library/cpp/codecs/zstd_dict_codec.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/codecs/zstd_dict_codec.cpp b/library/cpp/codecs/zstd_dict_codec.cpp index 6aa67abd62..c42a2879e6 100644 --- a/library/cpp/codecs/zstd_dict_codec.cpp +++ b/library/cpp/codecs/zstd_dict_codec.cpp @@ -28,8 +28,8 @@ namespace NCodecs { TPtrHolder(T* dict) : Ptr(dict) - { - } + { + } T* Get() { return Ptr; @@ -99,7 +99,7 @@ namespace NCodecs { TCCtx ctx{CheckPtr(ZSTD_createCCtx(), __LOCATION__)}; const size_t resSz = CheckSize(ZSTD_compress_usingCDict( ctx.Get(), outbuf.data() + szSz, maxDatSz, rawBeg, rawSz, CDict.Get()), - __LOCATION__); + __LOCATION__); if (resSz < rawSz) { outbuf.Resize(resSz + szSz); @@ -134,13 +134,13 @@ namespace NCodecs { outbuf.Resize(rawSz); memcpy(outbuf.data(), rawBeg, rawSz); } else { - // size_t zSz = ZSTD_getDecompressedSize(rawBeg, rawSz); - // Y_ENSURE_EX(datSz == zSz, TCodecException() << datSz << " != " << zSz); + // size_t zSz = ZSTD_getDecompressedSize(rawBeg, rawSz); + // Y_ENSURE_EX(datSz == zSz, TCodecException() << datSz << " != " << zSz); outbuf.Resize(datSz); TDCtx ctx{CheckPtr(ZSTD_createDCtx(), __LOCATION__)}; CheckSize(ZSTD_decompress_usingDDict( ctx.Get(), outbuf.data(), outbuf.size(), rawBeg, rawSz, DDict.Get()), - __LOCATION__); + __LOCATION__); outbuf.Resize(datSz); } } @@ -206,8 +206,8 @@ namespace NCodecs { template <class T> static T* CheckPtr(T* t, TSourceLocation loc) { - Y_ENSURE_EX(t, TCodecException() << loc << " " - << "unexpected nullptr"); + Y_ENSURE_EX(t, TCodecException() << loc << " " + << "unexpected nullptr"); return t; } @@ -230,8 +230,8 @@ namespace NCodecs { MyTraits.RecommendedSampleSize = TImpl::SampleSize; // same as for solar } - TZStdDictCodec::~TZStdDictCodec() { - } + TZStdDictCodec::~TZStdDictCodec() { + } TString TZStdDictCodec::GetName() const { return TStringBuilder() << MyName() << "-" << Impl->GetCompressionLevel(); |