aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/bit_io/bitinput.h
diff options
context:
space:
mode:
authorbreakneck <breakneck@yandex-team.ru>2022-02-10 16:47:58 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:58 +0300
commite2021f9a0e54d13b7c48796318b13b66dc625e74 (patch)
tree5aed1691033eaf399ab80a10a137238922035fa8 /library/cpp/bit_io/bitinput.h
parent83602b1b564b92a80a1526d113fa2846661dd10e (diff)
downloadydb-e2021f9a0e54d13b7c48796318b13b66dc625e74.tar.gz
Restoring authorship annotation for <breakneck@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/bit_io/bitinput.h')
-rw-r--r--library/cpp/bit_io/bitinput.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/bit_io/bitinput.h b/library/cpp/bit_io/bitinput.h
index 85711eb7f9..288f04c96f 100644
--- a/library/cpp/bit_io/bitinput.h
+++ b/library/cpp/bit_io/bitinput.h
@@ -43,7 +43,7 @@ namespace NBitIO {
// Read with static number of bits.
// Preserves what's in result.
template <ui64 bits, typename T>
- Y_FORCE_INLINE bool ReadK(T& result, ui64 skipbits) {
+ Y_FORCE_INLINE bool ReadK(T& result, ui64 skipbits) {
ui64 r64 = 0;
bool ret = bits <= 56 ? ReadKImpl<bits>(r64) : ReadSafe(r64, bits);
CopyToResultK<bits>(result, r64, skipbits);
@@ -53,7 +53,7 @@ namespace NBitIO {
// Read with static number of bits.
// Zeroes other bits in result.
template <ui64 bits, typename T>
- Y_FORCE_INLINE bool ReadK(T& result) {
+ Y_FORCE_INLINE bool ReadK(T& result) {
ui64 r = 0;
bool res = ReadK<bits>(r);
result = r;
@@ -62,7 +62,7 @@ namespace NBitIO {
// Shortcut to impl.
template <ui64 bits>
- Y_FORCE_INLINE bool ReadK(ui64& result) {
+ Y_FORCE_INLINE bool ReadK(ui64& result) {
if (bits <= 56)
return ReadKImpl<bits>(result);
@@ -80,7 +80,7 @@ namespace NBitIO {
// It's safe to read up to 64 bits.
// Zeroes other bits in result.
template <typename T>
- Y_FORCE_INLINE bool ReadSafe(T& result, ui64 bits) {
+ Y_FORCE_INLINE bool ReadSafe(T& result, ui64 bits) {
if (bits <= 56ULL)
return Read(result, bits);
@@ -98,7 +98,7 @@ namespace NBitIO {
// It's safe to read up to 64 bits.
// Preserves what's in result.
template <typename T>
- Y_FORCE_INLINE bool ReadSafe(T& result, ui64 bits, ui64 skipbits) {
+ Y_FORCE_INLINE bool ReadSafe(T& result, ui64 bits, ui64 skipbits) {
ui64 r64 = 0;
bool ret = ReadSafe(r64, bits);
CopyToResult(result, r64, bits, skipbits);
@@ -108,7 +108,7 @@ namespace NBitIO {
// Do not try to read more than 56 bits at once. Split in two reads or use ReadSafe.
// Zeroes other bits in result.
template <typename T>
- Y_FORCE_INLINE bool Read(T& result, ui64 bits) {
+ Y_FORCE_INLINE bool Read(T& result, ui64 bits) {
ui64 r64 = 0;
bool ret = ReadImpl(r64, bits);
result = r64;
@@ -116,14 +116,14 @@ namespace NBitIO {
}
// Shortcut to impl.
- Y_FORCE_INLINE bool Read(ui64& result, ui64 bits) {
+ Y_FORCE_INLINE bool Read(ui64& result, ui64 bits) {
return ReadImpl(result, bits);
}
// Do not try to read more than 56 bits at once. Split in two reads or use ReadSafe.
// Preserves what's in result.
template <typename T>
- Y_FORCE_INLINE bool Read(T& result, ui64 bits, ui64 skipbits) {
+ Y_FORCE_INLINE bool Read(T& result, ui64 bits, ui64 skipbits) {
ui64 r64 = 0;
bool ret = ReadImpl(r64, bits);
CopyToResult(result, r64, bits, skipbits);
@@ -134,7 +134,7 @@ namespace NBitIO {
// Like this: (unsigned char)0x2E<3> (0010 1110) <=> 1110 0101
// fddd fddd
template <ui64 bits, typename T>
- Y_FORCE_INLINE bool ReadWords(T& result) {
+ Y_FORCE_INLINE bool ReadWords(T& result) {
ui64 r64 = 0;
bool retCode = ReadWordsImpl<bits>(r64);
@@ -145,22 +145,22 @@ namespace NBitIO {
// Shortcut to impl.
template <ui64 bits>
- Y_FORCE_INLINE bool ReadWords(ui64& result) {
+ Y_FORCE_INLINE bool ReadWords(ui64& result) {
return ReadWordsImpl<bits>(result);
}
- Y_FORCE_INLINE bool Back(int bits) {
+ Y_FORCE_INLINE bool Back(int bits) {
return Seek(BitOffset() - bits);
}
- Y_FORCE_INLINE bool Seek(int bitoffset) {
+ Y_FORCE_INLINE bool Seek(int bitoffset) {
return TBitInputImpl::Seek(bitoffset);
}
// A way to read a portion of bits at random location.
// Didn't want to complicate sequential read, neither to copypaste.
template <typename T>
- Y_FORCE_INLINE bool ReadRandom(ui64 bitoffset, T& result, ui64 bits, ui64 skipbits) {
+ Y_FORCE_INLINE bool ReadRandom(ui64 bitoffset, T& result, ui64 bits, ui64 skipbits) {
const ui64 curr = BitOffset();
Seek(bitoffset);
bool ret = ReadSafe<T>(result, bits, skipbits);