Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func Bytes ¶
Bytes converts a byte count into a human-readable string using decimal (SI) units (kB, MB, GB, etc.). It uses a base of 1000 (1 kB = 1000 bytes).
func IBytes ¶
IBytes converts a byte count into a human-readable string using binary (IEC) units (KiB, MiB, GiB, etc.). It uses a base of 1024 (1 KiB = 1024 bytes).
func ParseBytes ¶
ParseBytes parses a string representation of bytes (like "1.5 GB" or "1024 B") and returns the number of bytes it represents. It supports both decimal (SI) and binary (IEC) units and handles values with commas as well.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.