opa: github.com/open-policy-agent/opa/internal/leb128 Index | Files

package leb128

import "github.com/open-policy-agent/opa/internal/leb128"

Package leb128 implements LEB128 integer encoding.


Package Files


func MustReadVarInt32 Uses

func MustReadVarInt32(r io.Reader) int32

MustReadVarInt32 returns an int32 from r or panics.

func MustReadVarInt64 Uses

func MustReadVarInt64(r io.Reader) int64

MustReadVarInt64 returns an int64 from r or panics.

func MustReadVarUint32 Uses

func MustReadVarUint32(r io.Reader) uint32

MustReadVarUint32 returns an uint32 from r or panics.

func MustReadVarUint64 Uses

func MustReadVarUint64(r io.Reader) uint64

MustReadVarUint64 returns an uint64 from r or panics.

func ReadVarInt32 Uses

func ReadVarInt32(r io.Reader) (int32, error)

ReadVarInt32 tries to read a int32 from r.

func ReadVarInt64 Uses

func ReadVarInt64(r io.Reader) (int64, error)

ReadVarInt64 tries to read a int64 from r.

func ReadVarUint32 Uses

func ReadVarUint32(r io.Reader) (uint32, error)

ReadVarUint32 tries to read a uint32 from r.

func ReadVarUint64 Uses

func ReadVarUint64(r io.Reader) (uint64, error)

ReadVarUint64 tries to read a uint64 from r.

func WriteVarInt32 Uses

func WriteVarInt32(w io.Writer, i int32) error

WriteVarInt32 writes u to w.

func WriteVarInt64 Uses

func WriteVarInt64(w io.Writer, i int64) error

WriteVarInt64 writes u to w.

func WriteVarUint32 Uses

func WriteVarUint32(w io.Writer, u uint32) error

WriteVarUint32 writes u to w.

func WriteVarUint64 Uses

func WriteVarUint64(w io.Writer, u uint64) error

WriteVarUint64 writes u to w.

Package leb128 imports 1 packages (graph) and is imported by 1 packages. Updated 2018-10-09. Refresh now. Tools for package owners.