byteunits-0.2.0.1: Human friendly conversion between byte units (KB, MB, GB...)

Safe HaskellSafe
LanguageHaskell2010

Data.ByteUnits

Synopsis

Documentation

getAppropriateUnits :: Float -> (ByteUnit, Float) Source #

Rounds up to the highest unit provided it's > 1

>>> getAppropriateUnits 1024
(KiloBytes,1.0)
>>> getAppropriateUnits (3.5 * 1024* 1024)
(MegaBytes,3.5)