use zlib's full gzip support

simpler code and seems to be generally faster
This commit is contained in:
2024-11-12 19:58:46 +11:00
parent 3e47d6cd01
commit aff578b9a6
2 changed files with 36 additions and 157 deletions

View File

@ -75,9 +75,9 @@ public struct ApkIndexUpdater {
do {
var file: any InputStream = try FileInputStream(indexURL)
//var file: any InputStream = try MemoryInputStream(buffer: try Data(contentsOf: indexURL))
tars.append(try GZip.read(inStream: &file))
tars.append(try GZip.read(inStream: &file))
var gzip = GZipReader()
tars.append(try gzip.read(inStream: &file))
tars.append(try gzip.read(inStream: &file))
} catch {
fatalError(error.localizedDescription)
}