are there any lzma decompressing function available in unity

As far as I know, the .unity3d and .unitypackage files are compressed by lzma or 7z compressing algorithm, while using these files in web player app, these should be decompressed. So there’re should be some decompressing algorithm in the web player dlls.
My question is can this function be called by us as a script API? If not, why cannot be called? We need this api to decompress some resources we compressed using the lzma or 7z algorithms while don’t want to add some decompressing dlls into the web app to enlarge the app itself in the condition that the unity dll already have it.

No you have no access to them.

Not sure why not though, but I would guess primarily because its part of the C end, it does not exist as .NET functionality (or sources) at all so it would have to be written explicitely to be offered.

also, if you have something present as resource you want to load, why not include it in the project or use asset bundles?

thanks for the reply. I need this because the resources are created by some other applications and stored at server and updated frequently. just similar to the mesh file created by the famous ‘meshserilzer2’ script, if we can zip it by lzma, it’s defintely be smaller, however, if using asset bundle, it’s quite difficult to update the resource by WEB applications

Do you particularly need to use LZMA or would another format be OK as long as the file size is reduced? You can use SharpZipLib with Unity to do zip and bzip compression.

There is also a C# port of the LZMA algorithm that you should be able to port if you need to.

I have been meaning to get around to it myself, but I haven’t had the time.

-Jeremy

has anyone had further success implementing lzma compress/decompress?