Smart Poi 3.0.0
WiFi Connected LED POV Poi
Loading...
Searching...
No Matches
formatBytes

Formats a size in bytes into a human-readable string.

Formats a size in bytes into a human-readable string.Converts a size in bytes into a string with appropriate units (B, KB, MB, GB). The conversion is done by dividing the size by the appropriate power of 1024.

Parameters
bytesThe size in bytes to format.
Returns
A string representing the size with appropriate units.
Note
This function is used to convert a size in bytes into a human-readable string.
The function uses floating-point division to ensure accurate results. (1024) returns "1.00KB"