Geodat: Reduce peak memory usage (#5581)

Fixes 5f7474120f
This commit is contained in:
Meow
2026-01-26 18:45:25 +08:00
committed by GitHub
parent 1951a278ac
commit 9a04eecaf9
7 changed files with 118 additions and 95 deletions

View File

@@ -29,6 +29,10 @@ func ReadAsset(file string) ([]byte, error) {
return ReadFile(platform.GetAssetLocation(file))
}
func OpenAsset(file string) (io.ReadCloser, error) {
return NewFileReader(platform.GetAssetLocation(file))
}
func ReadCert(file string) ([]byte, error) {
if filepath.IsAbs(file) {
return ReadFile(file)