import Foundation // The codec's decisions, compiled and run without a device, from the module directory: // // swiftc -O -o /tmp/gzip-utf8-codec-checks ios/BoundedGunzip.swift \ // tests/GzipUtf8CodecChecks.swift && /tmp/gzip-utf8-codec-checks @main struct GzipUtf8CodecChecks { static var failures = 0 static func check(_ condition: Bool, _ name: String) { if !condition { failures += 1 print("FAIL: \(name)") } } static func bytes(hex: String) -> Data { var data = Data(capacity: hex.count / 2) var index = hex.startIndex while index < hex.endIndex { let next = hex.index(index, offsetBy: 2) data.append(UInt8(hex[index..