Hi everyone, I am trying to compress my data using LZMA2 with the help of CocoaPods. Here are the steps I followed to achieve LZMA2 compression: Added the pod 'SWCompression', '~> 4.8' dependency to my Podfile and installed the pod using the terminal. When I try to compress the data using LZMA2, I am unable to do so because in SWCompression, LZMA2 compression is marked as TBD (To Be Determined). Here is the current status of SWCompression: Deflate BZip2 LZMA/LZMA2 LZ4 Decompression ✅ ✅ ✅ ✅ Compression ✅ ✅ TBD ✅ Zlib GZip XZ ZIP TAR 7-Zip Read ✅ ✅ ✅ ✅ ✅ ✅ Write ✅ ✅ TBD TBD ✅ TBD Since LZMA2 compression is still marked as TBD, is there any other way to achieve LZMA2 compression for my data in SwiftUI?
Compression LZMA2 (SWCompression)
I don’t have any insight into the third-party library you’re using. If you need help with that, you should raise a question via its support channel.
Apple’s Compression framework supports LZMA. According to the Fount of All Knowledge™ [1]:
LZMA2 is a simple container format that can include both uncompressed data and LZMA data
Compression framework only supports compressed streams; it doesn’t work with container formats at all. However, you could potentially use its LZMA compression to build support for that container format, either into that third-party library or in your own code.
If you’re not wedded to the LZMA2 container format, check out the Apple Archive container format.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] A DevForums bug (r. 139710861) prevents me from including the link properly, so here it is in plain text:
https://www.wikipedia.org/wiki/Lempel–Ziv–Markov_chain_algorithm
I have integrated LZMA2 compression into my iOS app, Hogs, and successfully implemented compression. However, when attempting to upload the app for TestFlight, I encountered an error:
"The app references non-public symbols in Payload/Hogs.app/Hogs: _lzma_code, _lzma_end."
These functions are part of the LZMA compression library (specifically LZMA2). Here's a detailed description of the issue:
What I Have Done: LZMA2 Integration: I integrated LZMA2 compression into the app and created a wrapper around the LZMA functions (_lzma_code, _lzma_end) to prevent direct references. App Build Configuration: I ensured the LZMA2 library is linked correctly with the -lzma flag in the linker settings. I wrapped the LZMA functions in custom functions (my_lzma_code, my_lzma_end) in an attempt to avoid using the non-public symbols directly. Error Message: During the app submission process, I received the following error:
"The app references non-public symbols in Payload/Hogs.app/Hogs: _lzma_code, _lzma_end." Steps Taken to Resolve: Checked if any LZMA functions were exposed incorrectly. Ensured that all non-public symbols were properly encapsulated in a wrapper. Verified linker settings to ensure the proper inclusion of the LZMA2 library. Request: Could anyone provide suggestions or best practices to resolve this issue and avoid references to non-public symbols? Should I use a different method for linking LZMA2 or encapsulating these symbols?
Thank You: I appreciate your help in resolving this issue so I can move forward with submitting the app for TestFlight.
I missed this reply when it came in (I was out of the office for the winter break) and sriramar started a new thread about this issue, so we’re going to continue over there.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"