         }
 
         // Test GZip unarchiving.
-        let decompressedData = try? GzipArchive.unarchive(archiveData: archiveData)
-
-        guard decompressedData != nil  else {
+        guard let decompressedData = try? GzipArchive.unarchive(archiveData: archiveData) else {
             XCTFail("Failed to decompress")
             return
         }

        self.unarchive(test: "test9")
    }

}

                _ = try? GzipArchive.unarchive(archiveData: archiveData)
            }
        #endif
    }

    func archive(test testName: String) {
        // Load answer data.
        guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
            XCTFail("Failed to get the answer")
            return
        }

        // Options for archiving.
        let mtimeDate = Date(timeIntervalSinceNow: 0.0)
        let mtime = Double(Int(mtimeDate.timeIntervalSince1970))
        let options: [ArchiveOption] = [.mtime(mtimeDate), .isTextFile,
                                        .comment("some file comment"), .fileName(testName + ".answer"),
                                        .gzipOS(7), .gzipHeaderCRC]

        // Test GZip archiving.
        guard let archiveData = try? GzipArchive.archive(data: answerData, options: options) else {
            XCTFail("Failed to create archive.")
            return
        }

        // Test output GZip header.
        guard let testGzipHeader = try? GzipHeader(archiveData: archiveData) else {
            XCTFail("Failed to get archive header")
            return
        }

        XCTAssertEqual(testGzipHeader.compressionMethod, .deflate, "Incorrect compression method")
        XCTAssertEqual(testGzipHeader.modificationTime?.timeIntervalSince1970, mtime, "Incorrect mtime")
        XCTAssertEqual(testGzipHeader.osType, .macintosh, "Incorrect os type")
        XCTAssertEqual(testGzipHeader.originalFileName, "\(testName).answer", "Incorrect original file name")
        XCTAssertEqual(testGzipHeader.comment, "some file comment", "Incorrect comment")
        XCTAssertTrue(testGzipHeader.isTextFile)

        // Test output GZip archive content.
        guard let decompressedData = try? GzipArchive.unarchive(archiveData: archiveData) else {
            XCTFail("Failed to decompress")
            return
        }

        XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
    }

    func testGzip1() {
