bitread

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bitread provides a wrapper for github.com/markus-wa/gobitread with CS:GO demo parsing specific helpers.

Intended for internal use only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitReader

type BitReader struct {
	bitread.BitReader
	// contains filtered or unexported fields
}

BitReader wraps github.com/markus-wa/gobitread.BitReader and provides additional functionality specific to CS:GO demos.

func NewLargeBitReader

func NewLargeBitReader(underlying io.Reader) *BitReader

NewLargeBitReader returns a BitReader with a large buffer, suitable for long streams (main demo file).

func NewSmallBitReader

func NewSmallBitReader(underlying io.Reader) *BitReader

NewSmallBitReader returns a BitReader with a small buffer, suitable for short streams.

func (*BitReader) Pool

func (r *BitReader) Pool()

Pool puts the BitReader into a pool for future use. Pooling BitReaders improves performance by minimizing the amount newly allocated readers.

func (*BitReader) ReadFloat

func (r *BitReader) ReadFloat() float32

ReadFloat reads a 32-bit float. Wraps ReadInt().

func (*BitReader) ReadSignedVarInt32

func (r *BitReader) ReadSignedVarInt32() int32

ReadSignedVarInt32 reads a variable size signed int (max 32-bit).

func (*BitReader) ReadString

func (r *BitReader) ReadString() string

ReadString reads a variable length string.

func (*BitReader) ReadUBitInt

func (r *BitReader) ReadUBitInt() uint

ReadUBitInt reads some kind of variable size uint. Honestly, not quite sure how it works.

func (*BitReader) ReadVarInt32

func (r *BitReader) ReadVarInt32() uint32

ReadVarInt32 reads a variable size unsigned int (max 32-bit).

Jump to

Keyboard shortcuts

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