Compiling of the ZipZap framework under OSX 10.11 succeeded. Using the framework I made a Swift project to display the contents of a zipped image archive. For that I use the following
func actualEntryData() -> NSData? {
let entry = imageArchive!.entries[entryIndex]
do {
let zipData = try entry.newData()
window.title = (entry.fileName)
return zipData
} catch let error as NSError {
Swift.print("Error: no valid data in \(error.domain)")
}
return nil
}
Then the image is created easily
if let imageObject = NSImage(data: data) {
...
}
Works nice, but I wonder if the storage space of the old entrydatas is freed after choosing a new Zip file for displaying.
The storage space of old entry data should be freed when the last strong reference goes away. If you find that it doesn't, write up a minimal project that demonstrates it and I'll take a look.
Compiling of the ZipZap framework under OSX 10.11 succeeded. Using the framework I made a Swift project to display the contents of a zipped image archive. For that I use the following
Then the image is created easily
Works nice, but I wonder if the storage space of the old entrydatas is freed after choosing a new Zip file for displaying.