1#include <IO/ReadBufferFromFileDescriptor.h>
2#include <IO/WriteBufferFromFileDescriptor.h>
3#include <IO/Operators.h>
4#include <common/StringRef.h>
5
6
7/** Calculates StringRefHash from stdin. For debugging.
8 */
9
10int main(int, char **)
11{
12 using namespace DB;
13
14 ReadBufferFromFileDescriptor in(STDIN_FILENO);
15 WriteBufferFromFileDescriptor out(STDOUT_FILENO);
16
17 String s;
18 readStringUntilEOF(s, in);
19 out << StringRefHash()(s) << '\n';
20
21 return 0;
22}
23