mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
25 lines
461 B
C++
25 lines
461 B
C++
|
#include <string>
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <DB/IO/VarInt.h>
|
||
|
#include <Poco/NumberParser.h>
|
||
|
#include <Poco/HexBinaryEncoder.h>
|
||
|
|
||
|
|
||
|
int main(int argc, char ** argv)
|
||
|
{
|
||
|
if (argc != 2)
|
||
|
{
|
||
|
std::cerr << "Usage: " << std::endl
|
||
|
<< argv[0] << " unsigned_number" << std::endl;
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
DB::UInt64 x = Poco::NumberParser::parseUnsigned64(argv[1]);
|
||
|
Poco::HexBinaryEncoder hex(std::cout);
|
||
|
DB::writeVarUInt(x, hex);
|
||
|
std::cout << std::endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|