Function kiwix::beautifyFileSize

Function Documentation

std::string kiwix::beautifyFileSize(uint64_t number)

Converts file size to human readable format.

This function will convert a number to its equivalent size using units.

Parameters:

number – file size in bytes.

Returns:

a human-readable string representation of the size, e.g., “2.3 KB”, “1.8 MB”, “5.2 GB”.