aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/archive/yarchive.cpp
diff options
context:
space:
mode:
authorlucius <lucius@yandex-team.ru>2022-02-10 16:50:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:14 +0300
commitfcc260ce89e9b359b47474d8dfa6dfcb6aae3fe9 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/archive/yarchive.cpp
parent95ad0bd7bde5cd56bd6395ad6b7c47f0e73e4c99 (diff)
downloadydb-fcc260ce89e9b359b47474d8dfa6dfcb6aae3fe9.tar.gz
Restoring authorship annotation for <lucius@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/archive/yarchive.cpp')
-rw-r--r--library/cpp/archive/yarchive.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/archive/yarchive.cpp b/library/cpp/archive/yarchive.cpp
index f34c8bf680..1becc3e5da 100644
--- a/library/cpp/archive/yarchive.cpp
+++ b/library/cpp/archive/yarchive.cpp
@@ -32,7 +32,7 @@ static inline T ESLoad(IInputStream* in) {
T t = T();
if (in->Load(&t, sizeof(t)) != sizeof(t)) {
- ythrow TSerializeException() << "malformed archive";
+ ythrow TSerializeException() << "malformed archive";
}
return LittleToHost(t);
@@ -49,7 +49,7 @@ inline TString ESLoad<TString>(IInputStream* in) {
const size_t readed = in->Read(tmp.Data(), toread);
if (!readed) {
- ythrow TSerializeException() << "malformed archive";
+ ythrow TSerializeException() << "malformed archive";
}
ret.append(tmp.Data(), readed);
@@ -190,7 +190,7 @@ private:
};
TArchiveWriter::TArchiveWriter(IOutputStream* out, bool compress)
- : Impl_(new TImpl(*out, compress))
+ : Impl_(new TImpl(*out, compress))
{
}
@@ -283,7 +283,7 @@ public:
for (size_t i = 0; i < count; ++i) {
TArchiveRecordDescriptorRef descr(new TArchiveRecordDescriptor(&d));
-
+
Recs_.push_back(descr);
Dict_[descr->Name()] = descr;
}
@@ -314,7 +314,7 @@ public:
inline bool Has(const TStringBuf key) const {
return Dict_.contains(key);
}
-
+
inline TAutoPtr<IInputStream> ObjectByKey(const TStringBuf key) const {
TBlob subBlob = BlobByKey(key);
@@ -322,9 +322,9 @@ public:
return new TArchiveInputStream(subBlob);
} else {
return new TMemoryInput(subBlob.Data(), subBlob.Length());
- }
+ }
}
-
+
inline TBlob ObjectBlobByKey(const TStringBuf key) const {
TBlob subBlob = BlobByKey(key);
@@ -354,7 +354,7 @@ public:
inline bool Compressed() const {
return UseDecompression;
}
-
+
private:
TBlob Blob_;
TVector<TArchiveRecordDescriptorRef> Recs_;
@@ -384,15 +384,15 @@ bool TArchiveReader::Has(const TStringBuf key) const {
TAutoPtr<IInputStream> TArchiveReader::ObjectByKey(const TStringBuf key) const {
return Impl_->ObjectByKey(key);
}
-
+
TBlob TArchiveReader::ObjectBlobByKey(const TStringBuf key) const {
return Impl_->ObjectBlobByKey(key);
}
TBlob TArchiveReader::BlobByKey(const TStringBuf key) const {
- return Impl_->BlobByKey(key);
-}
-
-bool TArchiveReader::Compressed() const {
- return Impl_->Compressed();
-}
+ return Impl_->BlobByKey(key);
+}
+
+bool TArchiveReader::Compressed() const {
+ return Impl_->Compressed();
+}