diff --git a/Sources/Nuke/Caching/DataCache.swift b/Sources/Nuke/Caching/DataCache.swift index 8a63cf1c3..20578f82f 100644 --- a/Sources/Nuke/Caching/DataCache.swift +++ b/Sources/Nuke/Caching/DataCache.swift @@ -48,14 +48,6 @@ public final class DataCache: DataCaching, @unchecked Sendable { /// The time interval between cache sweeps. The default value is 1 hour. public var sweepInterval: TimeInterval = 3600 - // Deprecated in Nuke 12.2 - @available(*, deprecated, message: "It's not recommended to use compression with the popular image formats that already compress the data") - public var isCompressionEnabled: Bool { - get { _isCompressionEnabled } - set { _isCompressionEnabled = newValue } - } - var _isCompressionEnabled = false - // Staging private let lock = NSLock() @@ -143,7 +135,7 @@ public final class DataCache: DataCaching, @unchecked Sendable { guard let url = url(for: key) else { return nil } - return try? decompressed(Data(contentsOf: url)) + return try? Data(contentsOf: url) } /// Returns `true` if the cache contains the data for the given key. @@ -322,33 +314,17 @@ public final class DataCache: DataCaching, @unchecked Sendable { switch change.type { case let .add(data): do { - try compressed(data).write(to: url) + try data.write(to: url) } catch let error as NSError { guard error.code == CocoaError.fileNoSuchFile.rawValue && error.domain == CocoaError.errorDomain else { return } try? FileManager.default.createDirectory(at: self.path, withIntermediateDirectories: true, attributes: nil) - try? compressed(data).write(to: url) // re-create a directory and try again + try? data.write(to: url) // re-create a directory and try again } case .remove: try? FileManager.default.removeItem(at: url) } } - // MARK: Compression - - private func compressed(_ data: Data) throws -> Data { - guard _isCompressionEnabled else { - return data - } - return try (data as NSData).compressed(using: .lzfse) as Data - } - - private func decompressed(_ data: Data) throws -> Data { - guard _isCompressionEnabled else { - return data - } - return try (data as NSData).decompressed(using: .lzfse) as Data - } - // MARK: Sweep /// Synchronously performs a cache sweep and removes the least recently items diff --git a/Sources/Nuke/Pipeline/ImagePipeline+Configuration.swift b/Sources/Nuke/Pipeline/ImagePipeline+Configuration.swift index d6e3c430d..7f44379c4 100644 --- a/Sources/Nuke/Pipeline/ImagePipeline+Configuration.swift +++ b/Sources/Nuke/Pipeline/ImagePipeline+Configuration.swift @@ -141,10 +141,6 @@ extension ImagePipeline { /// Data loading queue. Default maximum concurrent task count is 6. public var dataLoadingQueue = OperationQueue(maxConcurrentCount: 6) - // Deprecated in Nuke 12.6 - @available(*, deprecated, message: "The pipeline now performs cache lookup on the internal queue, reducing the amount of context switching") - public var dataCachingQueue = OperationQueue(maxConcurrentCount: 2) - /// Image decoding queue. Default maximum concurrent task count is 1. public var imageDecodingQueue = OperationQueue(maxConcurrentCount: 1) diff --git a/Sources/Nuke/Processing/ImageProcessors+Resize.swift b/Sources/Nuke/Processing/ImageProcessors+Resize.swift index 984136c2e..c87a7d935 100644 --- a/Sources/Nuke/Processing/ImageProcessors+Resize.swift +++ b/Sources/Nuke/Processing/ImageProcessors+Resize.swift @@ -19,10 +19,6 @@ extension ImageProcessors { private let crop: Bool private let upscale: Bool - // Deprecated in Nuke 12.0 - @available(*, deprecated, message: "Renamed to `ImageProcessingOptions.ContentMode") - public typealias ContentMode = ImageProcessingOptions.ContentMode - /// Initializes the processor with the given size. /// /// - parameters: