mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
28 lines
685 B
Swift
28 lines
685 B
Swift
// Copyright (c) 2026 Timofey Solomko
|
|
// Licensed under MIT License
|
|
//
|
|
// See LICENSE for license information
|
|
|
|
import SWCompression
|
|
|
|
extension GzipHeader: CustomStringConvertible {
|
|
|
|
public var description: String {
|
|
var output = """
|
|
File name: \(self.fileName ?? "")
|
|
File system type: \(self.osType)
|
|
Compression method: \(self.compressionMethod)
|
|
|
|
"""
|
|
if let mtime = self.modificationTime {
|
|
output += "Modification time: \(mtime)\n"
|
|
}
|
|
if let comment = self.comment {
|
|
output += "Comment: \(comment)\n"
|
|
}
|
|
output += "Is text file: \(self.isTextFile)"
|
|
return output
|
|
}
|
|
|
|
}
|