xxbytes

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Byte ByteUnit = 1
	KB            = Byte * 1024
	MB            = KB * 1024
	GB            = MB * 1024
	TB            = GB * 1024
)

Variables

This section is empty.

Functions

func CleanBf

func CleanBf(d []byte) []byte

清除字节中的控制字符: Bs控制字符, 字节:8

func Sum_XOR

func Sum_XOR(b []byte, sum byte) byte

将b字节切片与sum进行异或运算

Types

type ByteUnit

type ByteUnit float64

func ParseByteUnit added in v0.0.10

func ParseByteUnit(text string) (ByteUnit, error)

todo 先用正则解析,如果后续觉得性能不够,在使用for,按字节解析

func (ByteUnit) Int added in v0.0.8

func (i ByteUnit) Int() int

func (ByteUnit) Int32 added in v0.0.6

func (i ByteUnit) Int32() (int32, error)

func (ByteUnit) Int64 added in v0.0.6

func (i ByteUnit) Int64() int64

func (ByteUnit) Multiply added in v0.0.6

func (i ByteUnit) Multiply(x int) ByteUnit

func (ByteUnit) MultiplyFloat added in v0.0.10

func (i ByteUnit) MultiplyFloat(x float64) ByteUnit

func (ByteUnit) String

func (i ByteUnit) String() string

Jump to

Keyboard shortcuts

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