package
1.6.0
Repository: https://github.com/sphireinc/mantis.git
Documentation: pkg.go.dev

# README

Sphire Mantis::Byte

The Byte package of Mantis provides helper functions for parsing and working with bytes and related units

# Functions

ParseBytes parses the given string with byte units into a Byte count.

# Constants

B byte (Unit).
GB Gigabyte (SI) - 1e9 bytes.
GiB Gibibyte (NIST) - 2^30 bytes.
KB Kilobyte (SI) - 1000 bytes.
KiB Kibibyte (NIST) - 1024 bytes.
MB Megabyte (SI) - 1e6 bytes.
MiB Mebibyte (NIST) - 2^20 bytes.
PB Petabyte (SI) - 1e15 bytes.
PiB Pebibyte (NIST) - 2^50 bytes.
TB Terabyte (SI) - 1e12 bytes.
TiB Tebibyte (NIST) - 2^40 bytes.

# Structs

ParseErr returned invalid strings are parsed.

# Type aliases

Bytes is a formattable byte count.
BytesUnit represents a unit of magnitude for Bytes in either SI (base-10) or NIST (base-2).