package bytesext

import "github.com/go-playground/pkg/v5/bytes"

Index

Constants

const (
	BYTE = 1

	// Decimal (Powers of 10 for Humans)
	KB = 1000 * BYTE
	MB = 1000 * KB
	GB = 1000 * MB
	TB = 1000 * GB
	PB = 1000 * TB
	EB = 1000 * PB
	ZB = 1000 * EB
	YB = 1000 * ZB

	// Binary (Powers of 2 for Computers)
	KiB = 1024 * BYTE
	MiB = 1024 * KiB
	GiB = 1024 * MiB
	TiB = 1024 * GiB
	PiB = 1024 * TiB
	EiB = 1024 * PiB
	ZiB = 1024 * EiB
	YiB = 1024 * ZiB
)

Common byte unit sizes

Source Files

size.go

Version
v5.6.0
Published
Apr 28, 2022
Platform
darwin/amd64
Last checked
41 minutes ago

Tools for package owners.