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 GetBundleSet(index Index, tables, languages []string) map[string]bool
- func MurmurHash64A(data []byte, seed uint64) uint64
- func MurmurHashPath(path string) uint64
- func NewLoader(lower fs.FS) (*bundleFS, error)
- func OpenBundle(r io.ReaderAt) (*bundle, error)
- type Bundle
- type BundleManager
- type BytesReaderAt
- type FileLocation
- type Index
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecompressIndexBundle ¶
func DiscoverRequiredBundles ¶
func FNVHashPath ¶
FNVHashPath computes FNV-1a hash with "++" suffix for legacy PoE (≤3.21.2)
func GetBundleSet ¶ added in v1.1.0
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
func OpenBundle ¶
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 BundleManager ¶ added in v1.1.0
type BundleManager struct {
// contains filtered or unexported fields
}
BundleManager provides a high-level API for accessing bundle files
func NewBundleManager ¶ added in v1.1.0
func NewBundleManager(cacheDir, patch string) (*BundleManager, error)
NewBundleManager creates a new bundle manager
func (*BundleManager) Close ¶ added in v1.1.0
func (m *BundleManager) Close() error
Close closes the manager and releases resources
func (*BundleManager) FileExists ¶ added in v1.1.0
func (m *BundleManager) FileExists(path string) bool
FileExists checks if a file exists in the bundle, trying language-specific paths as needed
func (*BundleManager) GetFile ¶ added in v1.1.0
func (m *BundleManager) GetFile(path string) ([]byte, error)
GetFile reads the entire contents of a file from the bundle, trying language-specific paths as needed
func (*BundleManager) SetLanguages ¶ added in v1.1.0
func (m *BundleManager) SetLanguages(languages []string)
SetLanguages configures the languages to search for files
type BytesReaderAt ¶ added in v1.1.0
type BytesReaderAt struct {
// contains filtered or unexported fields
}
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