Skip to main content

parse_size

Function parse_size 

Source
pub fn parse_size(s: &str) -> Result<u64, String>
Expand description

Parses 512, 512K, 512M, 2G (and lowercase) into bytes.

Binary multipliers (1024-based), matching what --max-ratio’s siblings and every compression tool in this space mean by M.