1#pragma once
2
3#include <string>
4
5namespace DB
6{
7
8class WriteBuffer;
9
10}
11
12/// Displays the passed size in bytes as 123.45 GiB.
13void formatReadableSizeWithBinarySuffix(double value, DB::WriteBuffer & out, int precision = 2);
14std::string formatReadableSizeWithBinarySuffix(double value, int precision = 2);
15
16/// Displays the passed size in bytes as 132.55 GB.
17void formatReadableSizeWithDecimalSuffix(double value, DB::WriteBuffer & out, int precision = 2);
18std::string formatReadableSizeWithDecimalSuffix(double value, int precision = 2);
19
20/// Prints the number as 123.45 billion.
21void formatReadableQuantity(double value, DB::WriteBuffer & out, int precision = 2);
22std::string formatReadableQuantity(double value, int precision = 2);
23