File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,10 +4,12 @@ import Nodal
44
55public class PackageWriter < Target> {
66 private let archive : ZipArchive < Target >
7- public var model = Model ( )
87 private var contentTypes = ContentTypes ( )
98 private var relationships = Relationships ( )
109
10+ public var model = Model ( )
11+ public var compressionLevel = CompressionLevel . default
12+
1113 private init ( archive: ZipArchive < Target > ) {
1214 self . archive = archive
1315 contentTypes. add ( mimeType: MimeType . relationships. rawValue, for: " rels " )
@@ -69,7 +71,7 @@ internal extension PackageWriter {
6971 if filePath. hasPrefix ( " / " ) {
7072 filePath. removeFirst ( )
7173 }
72- try archive. addFile ( at: filePath, data: data)
74+ try archive. addFile ( at: filePath, data: data, compression : compressionLevel )
7375 }
7476
7577 func xmlDocument( ) -> Document {
You can’t perform that action at this time.
0 commit comments