block

package
v0.0.0-...-0dbb576 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	MaxSize int
	// contains filtered or unexported fields
}

func (*Block) Add

func (b *Block) Add(file *File) bool

func (*Block) AddPartial

func (b *Block) AddPartial(file *File) bool

func (Block) Chksum

func (b Block) Chksum(offset *int) (chksum int)

func (Block) Free

func (b Block) Free() int

func (Block) Length

func (b Block) Length() (length int)

func (*Block) PopLast

func (b *Block) PopLast() *File

func (*Block) Push

func (b *Block) Push(file *File) int

Adds a file, increasing the block's size

func (Block) String

func (b Block) String() string

type File

type File struct {
	ID     int
	Length int
}

func (File) String

func (f File) String() string

Jump to

Keyboard shortcuts

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