Skip to content

Commit 262164b

Browse files
committed
Add comment for compression level
1 parent 3db69ac commit 262164b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/SkipZip/SkipZip.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ public final class ZipWriter {
178178
/// - path: the path in the zip file to write to
179179
/// - data: the data to add
180180
/// - comment: an optional comment for the entry
181-
/// - compression: the compression mode
182-
/// - level: the compression level to use
181+
/// - compression: the compression level to use, where 0 is no compression (STORE), and 1-9 is in order of increasing compression (DEFLATE), and -1 is the default level (6)
183182
public func add(path: String, data: Data, comment: String? = nil, compression: Int?) throws {
184183
try check(minizip.zipOpenNewFileInZip_64(file: file, filename: path, zipfi: nil, extrafield_local: nil, size_extrafield_local: FFIUInt16(0), extrafield_global: nil, size_extrafield_global: FFIUInt16(0), comment: comment, compression_method: compression == nil ? CompressionMethod.store.rawValue : CompressionMethod.deflate.rawValue, level: Int32(compression ?? 0), zip64: Int32(1)))
185184

0 commit comments

Comments
 (0)