Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

7zip, lzma, LZ4, fastLZ, zip/gzip & brotli native multiplatform plugins.

Discussion in 'Assets and Asset Store' started by elias_t, Nov 16, 2013.

  1. linchenrr

    linchenrr

    Joined:
    Jul 28, 2014
    Posts:
    3
    OK. If There is any update, just reply me.
     
  2. Vladnee

    Vladnee

    Joined:
    Apr 28, 2017
    Posts:
    26
    hey, there) I have some problems with the LZ4 plugin, in editor mode throw exception:

    DllNotFoundException: liblz4 assembly:<unknown assembly> type:<unknown type> member:(null)
    LZ4.compressBuffer (System.Byte[] inBuffer, System.Int32 level, System.Boolean includeSize) (at Assets/_Packages/LZ4/Plugins/LZ4.cs:269)

    Plugin: version 2.9.2
    Unity: 2021.3.8f1 (Silicon), platform IOS

    please help:)

    upload_2022-9-2_18-1-25.png
     
  3. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Hello.

    Have you made sure the liblz4.a is set for ios in the inspector?
    Also. If you are on Silicon make sure that you replace the liblz4.bundle by decompressing the liblz4.bundle-SiliconSupport.zip.
     
    Last edited: Sep 4, 2022
    Vladnee likes this.
  4. Vladnee

    Vladnee

    Joined:
    Apr 28, 2017
    Posts:
    26
    Yeah, replace liblz4.bundle helped me) Thank you so much!
     
  5. Vladnee

    Vladnee

    Joined:
    Apr 28, 2017
    Posts:
    26
    upload_2022-9-23_0-20-59.png

    Hello, today I got this exception after decompressing and replacing liblz4.bundle with liblz4.bundle-SiliconSupport.zip.
    I guess this happened because I was updating mac os from 12.5 to 12.6, two weeks ago when I tested it everything worked fine

    Plugin: version 2.9.2
    Unity: 2021.3.8f1 (Silicon), platform IOS

    please help:)
     
  6. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Hello. Strange message. Have you tried reimporting the files from the asset store?
    One other thing you could try is to decompress the liblz4.bundle-Universal.zip and see if this works ok.
    I will look further into this.

    Edit: Ok. It seems to be a Monterey 12.6 issue. You should follow this video tutorial on how to remove extended attributes from the bundle:

    You should apply the xattr like this: xattr -cr /the-path-to-the-file/liblz4.bundle\Contents\MacOS\liblz4





    I will apply this fix on the next update.
     
    Last edited: Sep 22, 2022
    Vladnee likes this.
  7. Vladnee

    Vladnee

    Joined:
    Apr 28, 2017
    Posts:
    26
    Worked! Thank you so much:)
     
  8. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    hello i would like to ask
    I use brotli.decompressFile() like this
    return -2
    Do I need to pay attention?
    What is the reason for returning -2

    Unity version : 2021.3.11
    7zip, lzma, LZ4, fastLZ, zip/gzip & brotli native multiplatform plugins. : 2.9.2
     
  9. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Hello. -2 means corrupt input.
    But please tell me on which platform your making the test. Is it iOS? If yes then it is something that unity changed and the iOS plugin does not behave correctly. (it works in unity 2019 and 2022).

    I have a fix for that that will be implemented in the next update.
    If you need it now please send me a private message.
     
  10. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    yes.
    Is it iOS.

    I have sent you a private message, please confirm again
    thanks~
     
    Last edited: Oct 26, 2022
  11. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Replace the libbrotli.bundle file with one that is zipped in libbrotli.bundle-SiliconSupport.zip or libbrotli.bundle-Universal.zip (in ADL-Plugins\brotli\Plugins folder).
     
  12. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    Thank you, I will try again.
     
  13. sntgog

    sntgog

    Joined:
    Oct 20, 2018
    Posts:
    1
    Hello! I have some strange problem with brotli on IOS.
    brotli.decompressBuffer always return false in ios build.
    Android/Unity works perfectly.

    Unity 2021.3.15f1 silicon
     
  14. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Hello.

    Let me check this and I will get back to you.
     
  15. MobileheadSherman

    MobileheadSherman

    Joined:
    Oct 7, 2021
    Posts:
    1
    I have question for webgl. I m using the latest version (Version 2.9.2).
    Here is document spec.
    *webGL support is for compressing/decompressing lzma buffers only

    Is it impossible to decompress 7z file on webgl ? I really this feature. Please help me if someone knows it.
    Thanks
     
  16. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,366
    Hello. You cannot currently do this. I have still in development a version where you create a custom file container with lzma compressed files that will work on webGL but it is not ready yet.