intarr

package module
v0.0.0-...-e0d9580 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint64

func BytesToUint64(bts []byte) uint64

func Diff

func Diff(oldIds, currentIds []int) (joined, leaved []int)

Diff return removed and new items

func InArray

func InArray(value int64, array []int64) bool

func Pack

func Pack(in []uint64) (r []byte, e error)

func PackGzip

func PackGzip(s Slice) ([]byte, error)

func PackSnappy

func PackSnappy(s Slice) ([]byte, error)

func Sort

func Sort(s Slice)

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

func Unpack

func Unpack(data []byte) (arr []uint64, e error)

Types

type Slice

type Slice []uint64

func Decode

func Decode(b []byte) (Slice, error)

func New

func New(arr interface{}) (s Slice)

func UnpackGzip

func UnpackGzip(data []byte) (Slice, error)

func (Slice) AsInt

func (sl Slice) AsInt() (res []int)

func (Slice) Encode

func (sl Slice) Encode() ([]byte, error)

func (Slice) In

func (sl Slice) In(i uint64) bool

func (Slice) Int64

func (sl Slice) Int64() (res []int64)

func (Slice) Remove

func (sl Slice) Remove(num uint64) (res Slice)

func (Slice) Sort

func (s Slice) Sort()

Jump to

Keyboard shortcuts

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