We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 837f38b commit bb15267Copy full SHA for bb15267
snappy.cc
@@ -91,10 +91,7 @@ using internal::LITERAL;
91
// compression for compressible input, and more speed for incompressible
92
// input. Of course, it doesn't hurt if the hash function is reasonably fast
93
// either, as it gets called a lot.
94
-static inline uint32_t HashBytes(uint32_t bytes, int shift) {
95
- uint32_t kMul = 0x1e35a7bd;
96
- return (bytes * kMul) >> shift;
97
-}
+#define HashBytes(bytes, shift) ((uint32)((bytes) * (0x1e35a7bd)) >> (shift))
98
99
size_t MaxCompressedLength(size_t source_bytes) {
100
// Compressed data can be defined as:
0 commit comments