diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/codecs/zstd_dict_codec.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 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 c42a2879e6..6aa67abd62 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(); |