pub fn unit_str(val: u64, base: NumSys) -> String
Expand description

Converts bytes into human readable output.

use rust_apt::cache::Cache;
use rust_apt::util::{unit_str, NumSys};
let cache = Cache::new();
let version = cache.get("apt").unwrap().candidate().unwrap();

println!("{}", unit_str(version.size(), NumSys::Decimal));