bitread

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 5 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() error

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) ReadSignedVarInt64

func (r *BitReader) ReadSignedVarInt64() int64

ReadSignedVarInt64 reads a variable size signed int (max 64-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).

func (*BitReader) ReadVarInt64

func (r *BitReader) ReadVarInt64() uint64

ReadVarInt64 reads a variable size unsigned int (max 64-bit).

Jump to

Keyboard shortcuts

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