conversions

package
v0.0.0-...-d945efd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KiB 1024 bytes
	KiB = 1 << (10 * iota)
	// MiB 1024 KiB
	MiB
	// GiB 1024 MiB
	GiB
	// TiB 1024 GiB
	TiB
	// PiB 1024 TiB
	PiB
)
View Source
const (
	KB = 1000
	MB = 1000 * KB
	GB = 1000 * MB
	TB = 1000 * GB
	PB = 1000 * TB
)

Variables

This section is empty.

Functions

func BytesToGb

func BytesToGb(bytes int64) int64

func BytesToGib

func BytesToGib(bytes int64) int64

func BytesToMib

func BytesToMib(bytes int64) int64

func BytesToString

func BytesToString(b int64) string

func GbToBytes

func GbToBytes(gb int64) int64

func GbToMib

func GbToMib(gb int64) int64

func GibToBytes

func GibToBytes(gib int64) int64

func GibToMib

func GibToMib(gib int64) int64

func MibToBytes

func MibToBytes(mib int64) int64

func MibToGiB

func MibToGiB(mib int64) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL