Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index 0fd24ec9a097745168dc75daa069c7985b882b72..c59ca258aac4681ddfacbe03dc1aadaee720de53 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -174,48 +174,6 @@ class BitField { |
// ---------------------------------------------------------------------------- |
-// Support for compressed, machine-independent encoding |
-// and decoding of integer values of arbitrary size. |
- |
-// Encoding and decoding from/to a buffer at position p; |
-// the result is the position after the encoded integer. |
-// Small signed integers in the range -64 <= x && x < 64 |
-// are encoded in 1 byte; larger values are encoded in 2 |
-// or more bytes. At most sizeof(int) + 1 bytes are used |
-// in the worst case. |
-byte* EncodeInt(byte* p, int x); |
-byte* DecodeInt(byte* p, int* x); |
- |
- |
-// Encoding and decoding from/to a buffer at position p - 1 |
-// moving backward; the result is the position of the last |
-// byte written. These routines are useful to read/write |
-// into a buffer starting at the end of the buffer. |
-byte* EncodeUnsignedIntBackward(byte* p, unsigned int x); |
- |
-// The decoding function is inlined since its performance is |
-// important to mark-sweep garbage collection. |
-inline byte* DecodeUnsignedIntBackward(byte* p, unsigned int* x) { |
- byte b = *--p; |
- if (b >= 128) { |
- *x = static_cast<unsigned int>(b) - 128; |
- return p; |
- } |
- unsigned int r = static_cast<unsigned int>(b); |
- unsigned int s = 7; |
- b = *--p; |
- while (b < 128) { |
- r |= static_cast<unsigned int>(b) << s; |
- s += 7; |
- b = *--p; |
- } |
- // b >= 128 |
- *x = r | ((static_cast<unsigned int>(b) - 128) << s); |
- return p; |
-} |
- |
- |
-// ---------------------------------------------------------------------------- |
// Hash function. |
uint32_t ComputeIntegerHash(uint32_t key); |