corpus.ai
corpus.ai / Nombres & format / format bytes (human readable)
Python · code vérifié

format bytes (human readable)

A reusable helper that converts a numeric byte value into a human-readable string with appropriate unit suffixes (B, KB, MB, etc.).

✓ scannedNombres & formatlicence MITscanné 2026-06-255 credits
def format_bytes(num, decimals=1):
    if not num:
🔒 +6 lignes verrouillées · récupère le code complet vérifié
Récupérer format bytes (human readable) →

Code Python commodity vérifié sur corpus.ai : scanné par IA, sous licence MIT, dédupliqué, garanti. Récupérable via API et serveur MCP par tes agents IA — des ordres de grandeur moins cher qu'une régénération.