mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
Revert "Updated XZArchive and ZlibArchive to conform to new Archive protocol requirements."
This reverts commit d0657a0552.
This commit is contained in:
@@ -347,11 +347,6 @@ public final class XZArchive: Archive {
|
||||
else { throw XZError.wrongMagic }
|
||||
}
|
||||
|
||||
/// Abstract archive function.
|
||||
public static func archive(data: Data, options: [ArchiveOption]) throws -> Data {
|
||||
return Data()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension DataWithPointer {
|
||||
|
||||
@@ -168,7 +168,7 @@ public final class ZlibArchive: Archive {
|
||||
|
||||
- Returns: Data object with resulting archive.
|
||||
*/
|
||||
public static func archive(data: Data, options: [ArchiveOption]) throws -> Data {
|
||||
public static func archive(data: Data) throws -> Data {
|
||||
let out: [UInt8] = [
|
||||
120, // CM (Compression Method) = 8 (DEFLATE), CINFO (Compression Info) = 7 (32K window size).
|
||||
218, // Flags: slowest algorithm, no preset dictionary.
|
||||
|
||||
@@ -61,7 +61,7 @@ class ZlibTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let archiveData = try? ZlibArchive.archive(data: testData, options: []) else {
|
||||
guard let archiveData = try? ZlibArchive.archive(data: testData) else {
|
||||
XCTFail("Unable to create archive.")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user