Documentation
¶
Index ¶
- func DecompressIndexBundle(data []byte) ([]byte, error)
- func DiscoverRequiredBundles(cache *cache.Cache, patch string, languages []string, tables []string, ...) ([]string, error)
- func FNVHashPath(path string) uint64
- func MurmurHash64A(data []byte, seed uint64) uint64
- func MurmurHashPath(path string) uint64
- func NewLoader(lower fs.FS) (*bundleFS, error)
- type Bundle
- type FileLocation
- type Index
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecompressIndexBundle ¶
DecompressIndexBundle decompresses the index bundle using the bundle system
func DiscoverRequiredBundles ¶
func DiscoverRequiredBundles(cache *cache.Cache, patch string, languages []string, tables []string, allTables bool) ([]string, error)
DiscoverRequiredBundles parses the index file to find which bundles contain the DAT files needed based on the specified configuration (languages, tables, allTables flag).
func FNVHashPath ¶
FNVHashPath computes FNV-1a hash with "++" suffix for legacy PoE (≤3.21.2)
func MurmurHash64A ¶
MurmurHash64A implements the 64-bit MurmurHash2 algorithm as used by modern PoE (≥3.21.2) Reference: https://github.com/poe-tool-dev/poe-dat-viewer/blob/main/lib/src/utils/murmur2.ts
func MurmurHashPath ¶
MurmurHashPath computes MurmurHash64A of a lowercase path string with seed 0x1337b33f
Types ¶
type Bundle ¶
type Bundle interface {
// Read returns the entire contents of the bundle decompressed
Read() ([]byte, error)
// Size returns the uncompressed size of the bundle
Size() int64
// ReadAt reads data from a specific offset in the decompressed bundle
ReadAt(p []byte, off int64) (int, error)
}
Bundle represents an opened bundle that can be read from
type FileLocation ¶
FileLocation contains information about where a file is located in the bundle system
type Index ¶
type Index interface {
// GetFileInfo returns information about a file, including which bundle contains it
GetFileInfo(path string) (*FileLocation, error)
// ListBundles returns all bundle names in the index
ListBundles() []string
// ListFiles returns all file paths in the index
ListFiles() []string
}
Index represents a bundle index that can be used to find files and bundles
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides a high-level API for accessing bundle files
func NewManager ¶
NewManager creates a new bundle manager
func (*Manager) FileExists ¶
FileExists checks if a file exists in the bundle, trying language-specific paths as needed
func (*Manager) GetFile ¶
GetFile reads the entire contents of a file from the bundle, trying language-specific paths as needed
func (*Manager) SetLanguages ¶
SetLanguages configures the languages to search for files