human-memsize 0.1.0

Human-readable formatting for memory sizes
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 4.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 241.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • piot

💾 human-memsize

Make your byte sizes human-friendly. Because 1045678 looks scary, but 1 MiB feels just right.

License: MIT


✨ Features

  • 🧩 Binary units — Uses KiB, MiB, GiB, TiB
  • 🎯 Smart formatting:
    • Shows bytes up to 2 KiB for clarity.
    • Uses no decimals for exact numbers → 2 MiB, not 2.0 MiB.
    • Uses one decimal when needed → 1.5 MiB.

🛠️ Usage

Add to your Cargo.toml:

[dependencies]
human-memsize = "0.1"

Copyright 2025 Peter Bjorklund. All rights reserved.