diff options
author | sandello <sandello@yandex-team.ru> | 2022-02-10 16:49:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:52 +0300 |
commit | 9541fc30d6f0877db9ff199a16f7fc2505d46a5c (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yt/coding | |
parent | 0cdbcf332f1f329f0a3d6759462ad71e7867ac08 (diff) | |
download | ydb-9541fc30d6f0877db9ff199a16f7fc2505d46a5c.tar.gz |
Restoring authorship annotation for <sandello@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/coding')
-rw-r--r-- | library/cpp/yt/coding/varint-inl.h | 16 | ||||
-rw-r--r-- | library/cpp/yt/coding/varint.h | 16 | ||||
-rw-r--r-- | library/cpp/yt/coding/zig_zag.h | 26 |
3 files changed, 29 insertions, 29 deletions
diff --git a/library/cpp/yt/coding/varint-inl.h b/library/cpp/yt/coding/varint-inl.h index ade6cd98a3..f0a09e9d30 100644 --- a/library/cpp/yt/coding/varint-inl.h +++ b/library/cpp/yt/coding/varint-inl.h @@ -29,7 +29,7 @@ Y_FORCE_INLINE int WriteVarUint64Impl(TWriteCallback doWrite, ui64 value) } // These are optimized versions of these Read/Write functions in protobuf/io/coded_stream.cc. -Y_FORCE_INLINE int WriteVarUint64(IOutputStream* output, ui64 value) +Y_FORCE_INLINE int WriteVarUint64(IOutputStream* output, ui64 value) { return WriteVarUint64Impl([&] (ui8 byte) { output->Write(byte); @@ -51,7 +51,7 @@ Y_FORCE_INLINE int WriteVarUint32Impl(TOutput output, ui32 value) return WriteVarUint64(output, static_cast<ui64>(value)); } -Y_FORCE_INLINE int WriteVarUint32(IOutputStream* output, ui32 value) +Y_FORCE_INLINE int WriteVarUint32(IOutputStream* output, ui32 value) { return WriteVarUint32Impl(output, value); } @@ -69,7 +69,7 @@ Y_FORCE_INLINE int WriteVarInt32Impl(TOutput output, i32 value) return WriteVarUint64(output, static_cast<ui64>(ZigZagEncode32(value))); } -Y_FORCE_INLINE int WriteVarInt32(IOutputStream* output, i32 value) +Y_FORCE_INLINE int WriteVarInt32(IOutputStream* output, i32 value) { return WriteVarInt32Impl(output, value); } @@ -87,7 +87,7 @@ Y_FORCE_INLINE int WriteVarInt64Impl(TOutput output, i64 value) return WriteVarUint64(output, static_cast<ui64>(ZigZagEncode64(value))); } -Y_FORCE_INLINE int WriteVarInt64(IOutputStream* output, i64 value) +Y_FORCE_INLINE int WriteVarInt64(IOutputStream* output, i64 value) { return WriteVarInt64Impl(output, value); } @@ -119,7 +119,7 @@ Y_FORCE_INLINE int ReadVarUint64Impl(TReadCallback doRead, ui64* value) return count; } -Y_FORCE_INLINE int ReadVarUint64(IInputStream* input, ui64* value) +Y_FORCE_INLINE int ReadVarUint64(IInputStream* input, ui64* value) { return ReadVarUint64Impl([&] () { char byte; @@ -165,7 +165,7 @@ Y_FORCE_INLINE int ReadVarUint32Impl(ui32* value, Args... args) return bytesRead; } -Y_FORCE_INLINE int ReadVarUint32(IInputStream* input, ui32* value) +Y_FORCE_INLINE int ReadVarUint32(IInputStream* input, ui32* value) { return ReadVarUint32Impl(value, input); } @@ -194,7 +194,7 @@ Y_FORCE_INLINE int ReadVarInt32Impl(i32* value, Args... args) return bytesRead; } -Y_FORCE_INLINE int ReadVarInt32(IInputStream* input, i32* value) +Y_FORCE_INLINE int ReadVarInt32(IInputStream* input, i32* value) { return ReadVarInt32Impl(value, input); } @@ -220,7 +220,7 @@ Y_FORCE_INLINE int ReadVarInt64Impl(i64* value, Args... args) return bytesRead; } -Y_FORCE_INLINE int ReadVarInt64(IInputStream* input, i64* value) +Y_FORCE_INLINE int ReadVarInt64(IInputStream* input, i64* value) { return ReadVarInt64Impl(value, input); } diff --git a/library/cpp/yt/coding/varint.h b/library/cpp/yt/coding/varint.h index 6914c1d692..c5399f8b06 100644 --- a/library/cpp/yt/coding/varint.h +++ b/library/cpp/yt/coding/varint.h @@ -20,10 +20,10 @@ constexpr size_t MaxVarUint32Size = (8 * sizeof(ui32) - 1) / 7 + 1; // Various functions to read/write varints. // Returns the number of bytes written. -int WriteVarUint64(IOutputStream* output, ui64 value); -int WriteVarUint32(IOutputStream* output, ui32 value); -int WriteVarInt32(IOutputStream* output, i32 value); -int WriteVarInt64(IOutputStream* output, i64 value); +int WriteVarUint64(IOutputStream* output, ui64 value); +int WriteVarUint32(IOutputStream* output, ui32 value); +int WriteVarInt32(IOutputStream* output, i32 value); +int WriteVarInt64(IOutputStream* output, i64 value); int WriteVarUint64(char* output, ui64 value); int WriteVarUint32(char* output, ui32 value); @@ -31,10 +31,10 @@ int WriteVarInt32(char* output, i32 value); int WriteVarInt64(char* output, i64 value); // Returns the number of bytes read. -int ReadVarUint64(IInputStream* input, ui64* value); -int ReadVarUint32(IInputStream* input, ui32* value); -int ReadVarInt32(IInputStream* input, i32* value); -int ReadVarInt64(IInputStream* input, i64* value); +int ReadVarUint64(IInputStream* input, ui64* value); +int ReadVarUint32(IInputStream* input, ui32* value); +int ReadVarInt32(IInputStream* input, i32* value); +int ReadVarInt64(IInputStream* input, i64* value); int ReadVarUint64(const char* input, ui64* value); int ReadVarUint32(const char* input, ui32* value); diff --git a/library/cpp/yt/coding/zig_zag.h b/library/cpp/yt/coding/zig_zag.h index 2cd19f85a1..aa6d425a1c 100644 --- a/library/cpp/yt/coding/zig_zag.h +++ b/library/cpp/yt/coding/zig_zag.h @@ -1,23 +1,23 @@ -#pragma once - +#pragma once + #include <util/system/types.h> - -namespace NYT { - -//////////////////////////////////////////////////////////////////////////////// - + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + // These Functions provide coding of integers with property: 0 <= f(x) <= 2 * |x| // Actually taken 'as is' from protobuf/wire_format_lite.h - + ui32 ZigZagEncode32(i32 n); i32 ZigZagDecode32(ui32 n); - + ui64 ZigZagEncode64(i64 n); i64 ZigZagDecode64(ui64 n); - -//////////////////////////////////////////////////////////////////////////////// - -} // namespace NYT + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT #define ZIG_ZAG_INL_H_ #include "zig_zag-inl.h" |