Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.ByteUnits
Documentation
convertByteUnit :: ByteValue -> ByteUnit -> ByteValue Source #
Converts the ByteValue to an ByteValue with the specified ByteUnit
getAppropriateUnits :: ByteValue -> ByteValue Source #
Converts to the largest unit size provided the float value is > 1
>>>
getAppropriateUnits (ByteValue 1024 Bytes)
ByteValue 1 KiloBytes
>>>
getAppropriateUnits (ByteValue (3.5 * 1024* 1024) Bytes)
ByteValue 3.5 MegaBytes
getShortHand :: ByteValue -> String Source #