Loss Log now uses binary file, 2/3 size reduction

This commit is contained in:
2017-06-19 16:47:19 +02:00
parent 1e56a6247b
commit 16ea155d0d
9 changed files with 89 additions and 10 deletions
+4 -1
View File
@@ -75,7 +75,7 @@ extension CollectionViewMonth: NSCollectionViewDataSource {
}
item2.day.textColor = NSColor.black
operationQueue.addOperation {
guard let log = day.fileWrappers?["KDLog.txt"] else {
guard let log = day.fileWrappers?["KDLog.hex"] else {
OperationQueue.main.addOperation {
self.doc.progress.increment(by: 100/31)
if self.doc.progress.doubleValue > 98 {
@@ -84,7 +84,10 @@ extension CollectionViewMonth: NSCollectionViewDataSource {
}
return
}
/*
guard var logA = String(data: log.regularFileContents!, encoding: .utf8)?.components(separatedBy: "\n") else { return }
*/
guard var logA = FileOperations.load(log: log.regularFileContents! as NSData)?.components(separatedBy: "\n") else { return }
logA.removeLast()
item2.distribution = logA
OperationQueue.main.addOperation {
+1 -1
View File
@@ -44,7 +44,7 @@
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<key>CFBundleVersion</key>
<string>414</string>
<string>417</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
+1 -1
View File
@@ -1,2 +1,2 @@
version 2.0
build 414
build 417