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/archive/yarchive.h | |
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/archive/yarchive.h')
-rw-r--r-- | library/cpp/archive/yarchive.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/archive/yarchive.h b/library/cpp/archive/yarchive.h index 8120bcb940..a4e468ded2 100644 --- a/library/cpp/archive/yarchive.h +++ b/library/cpp/archive/yarchive.h @@ -1,10 +1,10 @@ #pragma once - + #include "models_archive_reader.h" #include <util/generic/fwd.h> #include <util/generic/ptr.h> - + class IInputStream; class IOutputStream; @@ -14,26 +14,26 @@ class TBlob; //noncompressed data will be stored with default alignment DEVTOOLS-4384 static constexpr size_t ArchiveWriterDefaultDataAlignment = 16; -class TArchiveWriter { -public: +class TArchiveWriter { +public: explicit TArchiveWriter(IOutputStream* out, bool compress = true); ~TArchiveWriter(); - - void Flush(); - void Finish(); + + void Flush(); + void Finish(); void Add(const TString& key, IInputStream* src); void AddSynonym(const TString& existingKey, const TString& newKey); - -private: - class TImpl; - THolder<TImpl> Impl_; -}; - + +private: + class TImpl; + THolder<TImpl> Impl_; +}; + class TArchiveReader : public IModelsArchiveReader { -public: +public: explicit TArchiveReader(const TBlob& data); ~TArchiveReader() override; - + size_t Count() const noexcept override; TString KeyByIndex(size_t n) const override; bool Has(TStringBuf key) const override; @@ -41,8 +41,8 @@ public: TBlob ObjectBlobByKey(TStringBuf key) const override; TBlob BlobByKey(TStringBuf key) const override; bool Compressed() const override; - -private: - class TImpl; - THolder<TImpl> Impl_; -}; + +private: + class TImpl; + THolder<TImpl> Impl_; +}; |