                                     return data.subdata(in: range)
             })
         } catch {
-            XCTFail("Failed to add zip64 format entry to uncompressed archive with error : \(error)")
+            XCTFail("Failed to add zip64 format entry to archive with error : \(error)")
         }
         let fileSystemRepresentation = FileManager.default.fileSystemRepresentation(withPath: archive.url.path)
         guard let archiveFile = fopen(fileSystemRepresentation, "rb") else {


extension ZIPFoundationTests {
    func testCreateZip64ArchiveWithLargeSize() {
        /// Target fields:
        /// Uncompressed Size, Compressed Size, Offset of Central Directory
        ///
        /// Expected structure:
        /// 4 + 2 [Version Needed to Extract] + 12 + 4 [Uncompressed Size: 0xffffffff]
        /// + 4 [Compressed Size: 0xffffffff] + 4 + n [File Name] + (2 [Header ID] + 2 [Field Length]
        /// + 8 [Uncompressed Size] + 8 [Compressed Size]) + n [File Data] + 20
        /// + [Uncompressed Size: 0xffffffff] + 4 [Compressed Size: 0xffffffff] + 18 + n [File Name]
        /// + (2 [Header ID] + 2 [Field Length] + 8 [Uncompressed Size] + 8 [Compressed Size])
        mockIntMaxValues()
        let archive = self.archive(for: #function, mode: .create)
        let size = 64 * 64 * 2

            XCTAssertEqual(zip64EOCDData.scanValue(start: 60), UInt32(0))
            XCTAssertEqual(zip64EOCDData.scanValue(start: 64), UInt(zip64EOCDOffset))
            XCTAssertEqual(zip64EOCDData.scanValue(start: 72), UInt32(1))
            return zip64EOCDSize
        } catch {
            XCTFail("Unexpected error while reading chunk from archive file.")
        }
        return 0
    }

    func testCreateZip64ArchiveWithZip64LFHOffset() {
        // Target fields:
        // Relative Offset of Local Header
        //
        // Expected structure:
        // 4 + 2 [Version Needed to Extract] + 12 + 4 [Uncompressed Size: 0xffffffff]
        // + 4 [Compressed Size: 0xffffffff] + 4 + n [File Name] + (2 [Header ID] + 2 [Field Length]
        // + 8 [Uncompressed Size] + 8 [Compressed Size]) + n [File Data] + 20
        // + [Uncompressed Size: 0xffffffff] + 4 [Compressed Size: 0xffffffff] + 18 + n [File Name]
        // + (2 [Header ID] + 2 [Field Length] + 8 [Uncompressed Size] + 8 [Compressed Size])
        mockIntMaxValues()

    }

    func testCreateZip64ArchiveWithTooManyEntries() {
        // Target fields:
        // Total Number of Entries in Central Directory, Size of Central Directory
        //
        // Expected structure:
        // 4 + 2 [Version Needed to Extract] + 12 + 4 [Uncompressed Size: 0xffffffff]
        // + 4 [Compressed Size: 0xffffffff] + 4 + n [File Name] + (2 [Header ID] + 2 [Field Length]
        // + 8 [Uncompressed Size] + 8 [Compressed Size]) + n [File Data] + 20
        // + [Uncompressed Size: 0xffffffff] + 4 [Compressed Size: 0xffffffff] + 18 + n [File Name]
        // + (2 [Header ID] + 2 [Field Length] + 8 [Uncompressed Size] + 8 [Compressed Size])
        mockIntMaxValues()
    }

