diff options
author | Igor Canadi <icanadi@fb.com> | 2014-08-19 06:48:21 -0700 |
---|---|---|
committer | Igor Canadi <icanadi@fb.com> | 2014-08-19 06:48:21 -0700 |
commit | 50b790c6d4d759c77157317ef768baf86f1544c9 (patch) | |
tree | b73f26e7042ca4a38c3d43546e86b65cd811988c /util/coding.h | |
parent | 162b8151f1b7d08578429643d202a7b28f535ba4 (diff) |
Removing BitStream* functions
Summary: I was checking some functions in coding.h and coding.cc when I noticed these unused functions. Let's remove them.
Test Plan: compiles
Reviewers: sdong, ljin, yhchiang, dhruba
Reviewed By: dhruba
Subscribers: leveldb
Differential Revision: https://reviews.facebook.net/D22077
Diffstat (limited to 'util/coding.h')
-rw-r--r-- | util/coding.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/util/coding.h b/util/coding.h index 6ad2077d4..fa6652668 100644 --- a/util/coding.h +++ b/util/coding.h @@ -115,32 +115,6 @@ inline const char* GetVarint32Ptr(const char* p, return GetVarint32PtrFallback(p, limit, value); } -// Writes an unsigned integer with bits number of bits with its least -// significant bit at offset. -// Bits are numbered from 0 to 7 in the first byte, 8 to 15 in the second and -// so on. -// value is truncated to the bits number of least significant bits. -// REQUIRES: (offset+bits+7)/8 <= dstlen -// REQUIRES: bits <= 64 -extern void BitStreamPutInt(char* dst, size_t dstlen, size_t offset, - uint32_t bits, uint64_t value); - -// Reads an unsigned integer with bits number of bits with its least -// significant bit at offset. -// Bits are numbered in the same way as ByteStreamPutInt(). -// REQUIRES: (offset+bits+7)/8 <= srclen -// REQUIRES: bits <= 64 -extern uint64_t BitStreamGetInt(const char* src, size_t srclen, size_t offset, - uint32_t bits); - -// Convenience functions -extern void BitStreamPutInt(std::string* dst, size_t offset, uint32_t bits, - uint64_t value); -extern uint64_t BitStreamGetInt(const std::string* src, size_t offset, - uint32_t bits); -extern uint64_t BitStreamGetInt(const Slice* src, size_t offset, - uint32_t bits); - // -- Implementation of the functions declared above inline void EncodeFixed32(char* buf, uint32_t value) { #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -291,14 +265,4 @@ inline Slice GetSliceUntil(Slice* slice, char delimiter) { return ret; } -inline uint64_t BitStreamGetInt(const std::string* src, size_t offset, - uint32_t bits) { - return BitStreamGetInt(src->data(), src->size(), offset, bits); -} - -inline uint64_t BitStreamGetInt(const Slice* src, size_t offset, - uint32_t bits) { - return BitStreamGetInt(src->data(), src->size(), offset, bits); -} - } // namespace rocksdb |