         var flags: UInt8 = 0
 
         var commentData = Data()
-        var fileNameData = Data()
-        var mtimeBytes: [UInt8] = [0, 0, 0, 0]
-        var os: UInt8 = 255
-
         if var comment = comment {
             flags |= 1 << 4
             if comment.characters.last != "\u{00}" {

            }
        }

        if var fileName = fileName {
            flags |= 1 << 3
            if fileName.characters.last != "\u{00}" {

            flags |= 1 << 0
        }

        var os: UInt8 = 255
        if let osType = osType {
            os = (osType == .other ? 255 : osType.rawValue).toUInt8()
        }

        var mtimeBytes: [UInt8] = [0, 0, 0, 0]
        if let modificationTime = modificationTime {
            let timeInterval = Int(modificationTime.timeIntervalSince1970)
            for i in 0..<4 {
