primitive

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const VarContinueBit = 0x80
View Source
const VarSegmentBits = 0x7F

Variables

View Source
var IdentifierNameSpaceRegex = regexp.MustCompile(`^[a-z0-9._-]+$`)
View Source
var IdentifierValueRegex = regexp.MustCompile(`^[a-z0-9/._-]+$`)

Functions

func DecodeMCString

func DecodeMCString(input io.ByteReader) (*string, error)

Types

type Identifier

type Identifier string

func (Identifier) ValidateNameSpace

func (i Identifier) ValidateNameSpace() error

func (Identifier) ValidateValue

func (i Identifier) ValidateValue() error

type MCString

type MCString string

func (MCString) ByteLength

func (s MCString) ByteLength() int

func (MCString) Encode

func (s MCString) Encode() []byte

type VarInt

type VarInt int32

func DecodeVarInt

func DecodeVarInt(input io.ByteReader) (*VarInt, error)

func (VarInt) ByteLength

func (i VarInt) ByteLength() int

func (VarInt) Encode

func (i VarInt) Encode() []byte

type VarLong

type VarLong int64

func DecodeVarLong

func DecodeVarLong(input io.ByteReader) (*VarLong, error)

func (VarLong) ByteLength

func (l VarLong) ByteLength() int

func (VarLong) Encode

func (l VarLong) Encode() []byte

Jump to

Keyboard shortcuts

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