- Hobby macOS developer/designer
- Researcher, PhD in Human Sciences
- Developer of CotEditor
- Organizer of the macOS native study group
- native macOS application design
- AppKit, SwiftUI, TextKit
- icon drawing
Swift package that enables gzip/gunzip Data using zlib
License: MIT License
Xcode 9 now builds the same binary for build, test and run, and therefore apps submitted using a framework built with coverage enabled are rejected by Apple for including tooling in the build settings.
Please disable code coverage so that default Carthage builds can be submitted to the App Store.
Installed v4.0.3 via CocoaPods:
pod 'GzipSwift', :git => 'https://github.com/1024jp/GzipSwift.git', :tag => '4.0.3'
Project build fails:
"No such module 'Gzip'"
These are the contents of GzipSwift pod folder after pod install/update
:
Xcode 9.1
I have used your library using pod, but it gives me bunch of errors and can't find Error, data etc.
Since Swift 5 the zipped data cannot be unziped again, even not in Finder.
When extracting not via API, the result is a file with name: origname.gz.cpgz
Extracting via API results in an empty String.
Compressed was a String with utf8 enconding.
Is there any way to get the data from the zip file
Please, Can you add precompiled xcframeworks in asset tags?
Thanks for all
I am getting Incorrect Header and also data1!.isGzipped is always returning true for my data. This is what I tried:
I am using this code
let data1 = rootArr.data(using: String.Encoding.utf8, allowLossyConversion: true)
if data1!.isGzipped {
let unzippedData = try! data1!.gunzipped()
print(unzippedData)
}
The method isGzipped is looking for anything starting with 0x1f but by the time I convert my string to NSData the encoding will result in the 01xf lost? I am not savvy with encoding.
This is my testing but in real app the data I am bringing from the server is a large json 15MB. I need to break it up and retrieve portions of it that have been zipped and unzip these. When retrieving json I get nsstring and I am trying to convert that to NSData to feed to the GZipSwift
Could anybody tell me how that can be done please
Cheers
Hey.
I need to send encoded url compress string with GET Request.
I try to compress the data and it work, but I have dont have the magic number at the beginning.
This is my compress string:
H4sIAAAAAAACE6vmUlBQMlZSsFKIBrKAbEMTCzMzY0slHQTX3MRYCciL5aoFAN6CsvEuAAAA
In my android app this is the compress string I send:
UwAAAB+LCAAAAAAAAACrVjJUsopWMjQ1NDE2NlHSgbLMQCwTE3NTQws4CyZmYolgWSrF6igZg00w
sTA3MgPyawFa5z/eUwAAAA==
Its not the same but you can see the diffrent in the beginning with the magic number.
I dont data.gzipped() and also try all the compress options.
What can I do?
Thanks!
I run into random runtime crashes on deflate(&stream, Z_FINISH)
and inflate(&stream, Z_SYNC_FLUSH)
when I build with Xcode 9.1.0.
Xcode: Version 9.1 (9B55)
iPhone 8: iOS 11.0.3 (15A432)
GzipSwift: 4.0.0 (cocoapods)
https://github.com/banjun/GzipSwiftXcode910
When Build & Run the project, randomly crash on the deflate
or the inflate
(or may cause malformed gunzipped data...?).
I have tried so far, Xcode 9.1 Simulator does not crash. also, building with Xcode 9.0.1 cannot cause crashes.
URLSession.dataTask
response with data as OS_dispatch_data
referencing numbers of 8K block data. I think this is one of the main usecases of gzip.
withUnsafeBytes
codes are suspicious, especially at
GzipSwift/Sources/Data+Gzip.swift
Line 279 in 72e16b8
withUnsafe
... methods are not responsible for pointer uses outside the trailing closure. it actually make creating Data -> z_stream
difficult.
Some memory copies into a new Data with contiguous memory can resolve the crashes.
GzipSwift/zlib/module.modulemap:1:8: note: previously defined here
module zlib [system] {
^
:0: error: could not build Objective-C module 'Gzip'
Testing this in Swift 5 and this seems to crash on
deflate(&stream, Z_FINISH) line 212
Is this library going to be compatible with Swift 5 at all
Thanks
some error appeared when i use GzipSwift in swift 4.2.
like:
` self.withUnsafeBytes { (inputPointer: UnsafeRawBufferPointer) in
stream.next_in = UnsafeMutablePointer(mutating: inputPointer.bindMemory(to: Bytef.self).baseAddress!).advanced(by: Int(stream.total_in))
stream.avail_in = uint(inputCount) - uInt(stream.total_in)
data.withUnsafeMutableBytes { (outputPointer: UnsafeMutableRawBufferPointer) in
stream.next_out = outputPointer.bindMemory(to: Bytef.self).baseAddress!.advanced(by: Int(stream.total_out))
stream.avail_out = uInt(outputCount) - uInt(stream.total_out)
status = deflate(&stream, Z_FINISH)
stream.next_out = nil
}
stream.next_in = nil
}`
anyone has a idea?
When i use the source, but i will raise error to say: Decompression failed: incorrect header check
How can i fix the problem?
I try a lot to search help from google, but no good answer and i still have such problem, can you please help?
after updating to xcode 12 i get this message:
Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler
what can i do?
Could you pls make additional [UInt8]
API? I wouldn't really like to import Foundation just for this :(
Hi
I am getting this error while installing manullay.
linker command failed with exit code 1 (use -v to see invocation)
I tried using this code to uncompress(gunzip) gzipped NSData in swift. Gunzip works fine when the gzipped NSData is smaller in size (eg. 653 bytes), however fails (returns nil) for larger NSData (eg. 9491 bytes).
Could you please let me know the fix for this?
Hi,
I'm using your great library for a while now without any issues :)
Since updating to xCode 9 last week, every time i try to export an archived enabling "rebuild from bitcode" option, xCode crash.
When trying to do the same using fastlane the script gets an exception as well.
While searching the export logs for the problem, it looks like GzipSwift has some issue with "symbol(s) not found for architecture armv7".
This is the exception in the log:
{
code = 646;
description = "ipatool failed with an exception: #<CmdSpec::NonZeroExcitException: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool exited with pid 13854 exit 1\nStdout:\n Debug: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk\n Debug: PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo\n MachoInfo: cd /\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo" "-info" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip" \n -= Output =-\n Non-fat file: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip is architecture: armv7\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump\n GetUUID: cd /\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump" "-u" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip" \n -= Output =-\n UUID: DB27237B-554D-30A9-B96F-BF00016E884F (armv7) /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit\n ExtractXAR: cd /\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/Gzip.framework/Gzip" "-extract" "_LLVM" "bundle" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.xar" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Bitcode bundle version: 1.0\n Debug: Setting platform to: iPhoneOS\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc\n Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\n Swift: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc" "-frontend" "-emit-object" "-target" "armv7-apple-ios8.0" "-O" "-module-name" "Gzip" "-disable-llvm-optzns" "1.bc" "-o" "1.o" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Clang: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios8.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-x" "ir" "2" "-o" "2.o" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Clang: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios4.3.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-x" "ir" "3" "-o" "3.o" \n -= Output =-\n Exited with 0\n \n Debug: Command took 0 seconds\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libz.1.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.B.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd\n Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCore.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCoreFoundation.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDarwin.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDispatch.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftFoundation.dylib\n Debug: Found framework/dylib: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftObjectiveC.dylib\n error: Ld: cd /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/tempvzSIsU\n "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" "-arch" "armv7" "-dylib" "-compatibility_version" "1.0.0" "-current_version" "1.0.0.0.0" "-install_name" "@rpath/Gzip.framework/Gzip" "-ios_version_min" "8.0.0" "-rpath" "@executable_path/Frameworks" "-rpath" "@loader_path/Frameworks" "-dead_strip" "-application_extension" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk" "-sdk_version" "11.0.0" "-filelist" "/private/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.out.LinkFileList" "-ignore_auto_link" "-allow_dead_duplicates" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libz.1.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.B.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libobjc.A.tbd" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCore.dylib" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftCoreFoundation.dylib" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDarwin.dylib" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftDispatch.dylib" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftFoundation.dylib" "/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/ipatool20171002-7457-r63wi3/thinned/armv7/Payload/Figure8-dev.app/Frameworks/libswiftObjectiveC.dylib" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.out" \n -= Output =-\n Undefined symbols for architecture armv7:\n "___llvm_profile_runtime", referenced from:\n hidden#64 in 1.o\n ld: symbol(s) not found for architecture armv7\n Exited with 1\n \n \n error: Failed to compile bundle: /var/folders/v9/cldk_77946531cp83qy1842w0000gn/T/GzipPB8ke/Gzip.armv7.xar\n \n\nStderr:\n>\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:209:in run'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2178:in
block in CompileOrStripBitcodeInBundle'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2130:in each'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2130:in
CompileOrStripBitcodeInBundle'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2314:in ProcessIPA'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2929:in
When disabling bitcode recompile everything works fine
Hello,
I'm using Carthage. Is there a Swift 3 branch since the project I'm working on uses Swift 3?
Thanks
DataSize.chunk is currently 2 ^ 14 which is a value of 12 (^ is the XOR operator), not the intended value of 16384.
Changing this to 1 << 14 solved an issue where data compressed with .gzipped() wouldn't decompress with .gunzipped().
Hey!
I want to suggest you to add an extension for JSONEncoder.DataEncodingStrategy
that's really help to use GzipSwift for requests:
extension JSONEncoder.DataEncodingStrategy {
// Gzip data encoding strategy.
public static var gzip: JSONEncoder.DataEncodingStrategy {
return .custom { data, encoder throws in
var container = encoder.singleValueContainer()
let gzippedData = try data.gzipped()
try container.encode(gzippedData)
}
}
}
Here how it would be easy to use:
let encoder = JSONEncoder()
encoder.dataEncodingStrategy = .gzip
urlRequest.httpBody = try encoder.encode(data)
urlRequest.addValue("gzip", forHTTPHeaderField: "Content-Encoding")
Let me know what you think.
When trying to compile my project I get the following error message: Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1
The readme on the "swift4"-branch says the same config as for "develop"-branch (using cocoa pods). Does this work or do I have to build manually? Thank you very much in advance.
Decompressing a remote gzip-file produces the identical file with the same size. No decompression no deflating of the size and content.
Environment macOS Catalina, XCode 11.3 Swift 5.0, target iOS 12.0
Any ideas?
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/module.modulemap:1872:8: error: redefinition of module 'zlib'
module zlib [system] [extern_c] {
^
/Pods/GzipSwift/zlib/module.modulemap:1:8: note: previously defined here
module zlib [system]
I wasn't sure from your README how I might use this to gunzip a folder of files in my Documents directory for example. Are you able to just call write on the NSData object and it will handle writing out all of the files in the archive?
Thanks.
As of March 13, Apple has started sending notifications when uploading builds to the App Store, with this becoming mandatory from May 1 onwards. To ensure compliance and seamless operation of our app, it's imperative that we integrate the xcprivacy manifest into our iOS SDK.
In line with Apple's guidelines, we need to ensure that all SDKs utilized within our app are equipped with the xcprivacy manifest. This will not only ensure compliance with Apple's regulations but also guarantee the privacy and security of our users' data.
To facilitate a smooth transition and maintain the functionality of our app, we are seeking the most compatible version of the xcprivacy manifest for our iOS SDK. Our aim is to upgrade to the latest version seamlessly, thereby minimizing any disruptions to our users' experience.
I kindly request your prompt attention to this matter. Please prioritize the integration of the xcprivacy manifest into our iOS SDK to meet the upcoming deadlines set by Apple.
While manually integration getting linker command failed with exit code 1 (use -v to see invocation) "no framework found issue"
and on pod integration while import Gzip getting "No such module Gzip" issue.
Is it currently possible to send data as a .gz file?
Version 6.1.0 of the package can't be installed because of a typo in the file [email protected]
.
Doing a simple package update during the build invalidates the whole project with Xcode presenting the error
Invalid manifest (compiled with: ["/Applications/Xcode-15.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/TemporaryDirectory.vh9fZx/vfs.yaml", "-L", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-target", "arm64-apple-macos13.0", "-sdk", "/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-swift-version", "5", "-I", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-sdk", "/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-package-description-version", "5.10.0", "-Xfrontend", "-serialize-diagnostics-path", "-Xfrontend", "/Users/[REDACTED]/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/gzipswift.dia", "/[email protected]", "-disallow-use-new-driver", "-o", "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/TemporaryDirectory.VUJWLU/gzipswift-manifest"])
<unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'
/[email protected]:14:78: error: expected ',' separator
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")])
^
,
/[email protected]:15:9: error: expected expression in container literal
),
^ in https://github.com/1024jp/GzipSwift2024-06-17 13:25:24.715 xcodebuild[8695:42623] Writing error result bundle to /var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/ResultBundle_2024-17-06_13-25-0024.xcresult
xcodebuild: error: Could not resolve package dependencies:
Invalid manifest (compiled with: ["/Applications/Xcode-15.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/TemporaryDirectory.vh9fZx/vfs.yaml", "-L", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-target", "arm64-apple-macos13.0", "-sdk", "/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-swift-version", "5", "-I", "/Applications/Xcode-15.4.0.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-sdk", "/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk", "-package-description-version", "5.10.0", "-Xfrontend", "-serialize-diagnostics-path", "-Xfrontend", "/Users/[REDACTED]/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/gzipswift.dia", "/[email protected]", "-disallow-use-new-driver", "-o", "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/TemporaryDirectory.VUJWLU/gzipswift-manifest"])
<unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'
/[email protected]:14:78: error: expected ',' separator
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")])
^
,
/[email protected]:15:9: error: expected expression in container literal
),
^ in https://github.com/1024jp/GzipSwift
The PR #64 fixes the issue.
Using Xcode 10.2
Swift 4.2
I made a small test project to demonstrate the issue (copying in the Gzip extension from master) here.
it seems that the second iteration of this loop in the gzipped
function causes the crash:
while stream.avail_out == 0 {
if Int(stream.total_out) >= data.count {
data.count += DataSize.chunk
}
data.withUnsafeMutableBytes { (bytes: UnsafeMutablePointer<Bytef>) in
stream.next_out = bytes.advanced(by: Int(stream.total_out))
}
stream.avail_out = uInt(data.count) - uInt(stream.total_out)
deflate(&stream, Z_FINISH)
}
I'm not super familiar with the stream APIs so I'm not exactly sure what's going on.
Thank you!
Hi,
I've :
And import doesn't work.
Did I miss something ?
Create podspec and register it.
I have encountered an issue while gunzipping a file 52KB size long. I mention size as I reckon that is the root cause.
public var isGzipped: Bool
works correctly, and recognises the file as such, a gzipped file.
However, library fails to gunzip it and throws and error when using public func gunzipped() throws -> Data
Error thrown looks as follows:
▿ GzipError
Reading through zlib documentation, seems like Z_BUF_ERROR is not fatal
(this is what causes GzipSwift to eventually throw Gzip.GzipError.Kind.buffer), and deflate() can be called again with more input and more output space to continue compressing.
I'm attaching the above mentioned file, in hopes that this issue gets resolved by contributors soon / at some point :)
The Gzip library name and GzipSwift repo name seems to be a bit troublesome for the SPM.
This warning is displayed in Xcode 15.0.1: 'package(name:url::)' is deprecated: use package(url::) instead
As you mentioned in Readme file:
pod "GzipSwift"
After calling "pod install" in terminal:
[!] Unable to find a specification for
GzipSwift
I am trying to generate the archive of my app for the iOS store. I get this error <<< ld: bitcode bundle could not be generated because 'myApp/Frameworks/Gzip.framework/Gzip' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file 'myApp/Frameworks/Gzip.framework/Gzip' for architecture arm64 >>>
I don't understand because I activated the <<<Project settings/Build Options/ Enable Bitcode Yes >>> inside the Gzip project before building it and copying the .framework into my application project.
I am using Xcode 9.4.1
I'm building a swift framework(not an app) now, and I follow the instruction to add an objective-c bridging header under build settings and add "#import <zlib.h>" to this file. I also add libz.dylib library to my linked framework and libraries and with status "required".
But when I build my framework, it shows error message...
error: using bridging headers with framework targets is unsupported
I find the solution in the stack overflow:
http://stackoverflow.com/questions/24875745/xcode-6-beta-4-using-bridging-headers-with-framework-targets-is-unsupported
I don't find any "umbrella file" in my Xcode, so I cannot solve this problem.Can any one help me? Thank you very much. Sorry for I'm very new to iOS development.
I think version 5.2.0 was not pushed to spec repo. It is still on 5.1.2
Hi,
Starting this April, all apps will need to be built with Xcode 15.
Along with that, the privacy manifest will need to be compatible as you know.
Does the GzipSwift also need to support privacy manifests?
Best,
Currently, I am using GZip framework in my sub-project and when running the application I see the following error
/PlugIns/MobiConnect-iOSUITests.xctest/Frameworks/MobiCore.framework/Frameworks/Gzip.framework/Gzip) not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
I do not see the issue when running on iOS 13 but see the issue for iOS 14
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.