ftab

package
v0.0.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FtabMagic uint64 = 0x62617466736f6b72 // "rkosftab" in ASCII

Variables

View Source
var (
	ErrInvalidMagic   = errors.New("invalid ftab magic")
	ErrInvalidVersion = errors.New("unsupported ftab version")
)

Functions

This section is empty.

Types

type CompressedEntry

type CompressedEntry struct {
	ID             uint32
	OriginalSize   uint32
	CompressedSize uint32
}

type Entry

type Entry struct {
	EntryHeader
	// contains filtered or unexported fields
}

func (*Entry) Decompress

func (e *Entry) Decompress() ([]byte, error)

func (*Entry) IsCompressed

func (e *Entry) IsCompressed() (*CompressedEntry, bool)

func (*Entry) Read

func (e *Entry) Read(p []byte) (n int, err error)

Read implements the io.Reader interface for Entry

type EntryHeader

type EntryHeader struct {
	Tag    [4]byte
	Offset uint32
	Size   uint32
	// contains filtered or unexported fields
}

EntryHeader represents a single entry in an ftab file

type Ftab

type Ftab struct {
	Header  Header
	Entries []*Entry
	Ticket  []byte // Optional ApTicket data for signature verification
	// contains filtered or unexported fields
}

Ftab represents a parsed ftab file

func Open

func Open(path string) (*Ftab, error)

Open opens an ftab file from the given path

func Parse

func Parse(r io.ReaderAt) (*Ftab, error)

Parse parses an ftab from the given reader

func (*Ftab) Close

func (f *Ftab) Close() error

func (*Ftab) GetEntryByName

func (f *Ftab) GetEntryByName(name string) *Entry

GetEntryByName returns the entry with the given name, or nil if not found

func (*Ftab) GetEntryByOffset

func (f *Ftab) GetEntryByOffset(offset uint32) *Entry

GetEntryByOffset returns the entry containing the given offset, or nil if not found

func (*Ftab) String

func (f *Ftab) String() string

Dump prints the contents of the ftab to stdout

type Header struct {
	Unknown    [8]uint32
	Magic      uint64 // 'rkosftab'
	NumEntries uint32
	Version    uint32 // ? always 0
}

Header represents the header of an ftab file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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