Cache a gzip compression file (Playmaker)

Discussion and help for Easy Save 3
Post Reply
BISLY
Posts: 5
Joined: Wed Oct 16, 2019 10:06 am

Cache a gzip compression file (Playmaker)

Post by BISLY »

Hi,
i have posted before about saving files getting too large, and kinda solved it with the gzip compression with your help.
but I have an issue (or its standard..?) that i now I cannot cache a file which is gzip compressed. geting error:

GameObject : FSM : State 5 : CacheFile : System.NotSupportedException: This operation is not supported.
at System.IO.Compression.GZipStream.get_Length () [0x00000] in <14e3453b740b4bd690e8d4e5a013a715>:0
at ES3.LoadRawBytes (ES3Settings settings) [0x00025] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\Scripts\ES3.cs:547
at ES3File.CacheFile (ES3Settings settings) [0x00034] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\Scripts\ES3File.cs:365
at ES3.CacheFile (ES3Settings settings) [0x00001] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\Scripts\ES3.cs:1414
at ES3.CacheFile (System.String filePath, ES3Settings settings) [0x00001] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\Scripts\ES3.cs:1407
at ES3PlayMaker.CacheFile.Enter () [0x00001] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\PlayMaker\ES3PlayMaker.cs:1540
at ES3PlayMaker.ActionBase.OnEnter () [0x00002] in D:\Unity Projects\FoodCostNew\Assets\Plugins\Easy Save 3\PlayMaker\ES3PlayMaker.cs:42
UnityEngine.Debug:LogError(Object, Object)
HutongGames.PlayMaker.FsmLog:AddEntry(FsmLogEntry, Boolean) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:172)
HutongGames.PlayMaker.FsmLog:LogAction(FsmLogType, String, Boolean) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:361)
HutongGames.PlayMaker.FsmStateAction:LogError(String) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmStateAction.cs:280)
ES3PlayMaker.ActionBase:HandleError(String) (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:64)
ES3PlayMaker.ActionBase:OnEnter() (at Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:46)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2771)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2718)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:Start() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1926)
PlayMakerFSM:Start() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:563)

is it truly not supported like it says or its a bug?

And another question, if gzip compresses the file so significantly, why its not the default? what are the disadvantageous of using it?

Thanks,
BISLY
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Cache a gzip compression file (Playmaker)

Post by Joel »

Hi there,

For the current version this is expected because GZip streams don't have a fixed length, so it's not possible to get the raw bytes using normal methods. However, in 3.3.1f9 we've created a workaround which we will be adding. If you PM me your invoice number I'll be happy to send you this update over.

Compression isn't enabled by default because there is a performance impact to compressing data, and for most people performance is a bigger priority than file size.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply