Help us shape the future of Go! Take the 2026 Go Developer Survey

bom

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBad     = 0
	TypeFile    = 1
	TypeDir     = 2
	TypeSymLink = 3
	TypeDevice  = 4
	TypeSocket  = 5
)
View Source
const (
	ArchNone  = 0
	ArchMachO = 1
	ArchFat   = 2
	ArchCFM   = 3
)
View Source
const (
	CompressionNone = 0
	CompressionZlib = 1
	CompressionBZ2  = 2
	CompressionAuto = 8
	CompressionMask = 0xF
)

Variables

View Source
var ErrBlockNotFound = errors.New("bom: block not found")
View Source
var ErrInvalidFormat = errors.New("bom: invalid format")

Functions

This section is empty.

Types

type BOM

type BOM struct {
	Header     header
	BlockTable blockTable
	Vars       []Var
	// contains filtered or unexported fields
}

func New

func New(r io.ReaderAt) (*BOM, error)

func (*BOM) BlockNames

func (b *BOM) BlockNames() []string

func (*BOM) GetPaths

func (b *BOM) GetPaths() ([]os.FileInfo, error)

func (*BOM) ReadBlock

func (b *BOM) ReadBlock(name string) (io.Reader, error)

func (*BOM) ReadTree

func (b *BOM) ReadTree(name string) (*Tree, error)

func (*BOM) ReadTrees

func (b *BOM) ReadTrees(name string) ([]*Tree, error)

type File

type File struct {
	// contains filtered or unexported fields
}

func (*File) IsDir

func (b *File) IsDir() bool

func (*File) ModTime

func (b *File) ModTime() time.Time

func (*File) Mode

func (b *File) Mode() os.FileMode

func (*File) Name

func (b *File) Name() string

func (*File) Size

func (b *File) Size() int64

func (*File) Sys

func (b *File) Sys() any

type Pointer

type Pointer struct {
	Address uint32
	Length  uint32
}

type Tree

type Tree struct {
	IsLeaf   uint16
	Count    uint16
	Forward  uint32
	Backward uint32
	Indices  []TreeIndex
	// contains filtered or unexported fields
}

func (*Tree) Reader

func (t *Tree) Reader() io.Reader

type TreeHeader

type TreeHeader struct {
	Magic     [4]byte // 'tree'
	Version   uint32
	Child     uint32
	BlockSize uint32
	PathCount uint32
	Unknown   uint8
}

type TreeIndex

type TreeIndex struct {
	Value uint32
	Key   uint32

	KeyReader   io.Reader
	ValueReader io.Reader
}

type Var

type Var struct {
	BlockTableIndex uint32
	NameLength      uint8
	Name            string
}

Jump to

Keyboard shortcuts

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