Search found 22 matches

by MaximumFirecracker
Thu Dec 26, 2019 5:24 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Best practices for reading and writing byte arrays
Replies: 5
Views: 9632

Re: Best practices for reading and writing byte arrays

I added a custom wrapper type and some extension methods, so now I can save byte arrays fast with ES2Writer.SaveBytes and ES2Data.LoadBytes. Speedup is around 10x.

All the best.
Happy new year in advance!
by MaximumFirecracker
Wed Dec 25, 2019 11:07 pm
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Best practices for reading and writing byte arrays
Replies: 5
Views: 9632

Re: Best practices for reading and writing byte arrays

I suppose one could create a custom ES2Type wrapper class for byte[] that uses writer.WriteRaw for the byte array. Then you would be able to save byte arrays fast and with tag support.
by MaximumFirecracker
Tue Dec 24, 2019 9:13 pm
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Best practices for reading and writing byte arrays
Replies: 5
Views: 9632

Re: Best practices for reading and writing byte arrays

I need this to be part of a ES2Writer and have it retrievable by ES2Data. Is it not possible to WriteRaw with tag?
by MaximumFirecracker
Tue Dec 24, 2019 6:01 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Best practices for reading and writing byte arrays
Replies: 5
Views: 9632

Best practices for reading and writing byte arrays

I'm getting some slow performance when reading and writing large byte arrays using ES2. I notice in the code that ES2 seems to write and read/parse one byte at the time using a loop. Clearly, since System.IO.File.ReadAllBytes is much, much faster, ES2 should be able to read and write byte arrays ver...
by MaximumFirecracker
Mon Aug 21, 2017 7:12 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Cannot read Vector3 array
Replies: 3
Views: 7783

Re: Cannot read Vector3 array

Thanks! That fixed it.
by MaximumFirecracker
Mon Aug 21, 2017 4:58 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Cannot read Vector3 array
Replies: 3
Views: 7783

Re: Cannot read Vector3 array

Ok, if loading the file directly this error doesn't seem to occur. So I guess EasySave doesn't like TextAssets?
by MaximumFirecracker
Mon Aug 21, 2017 4:45 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Cannot read Vector3 array
Replies: 3
Views: 7783

Cannot read Vector3 array

I just bumped into this very odd error. Whenever I try to load this Vector3 array, I get an OutOfMemoryException. var bytes = Resources.Load<TextAsset>("bakeData").bytes; var data = ES2Reader.Create(bytes, new ES2Settings { }); var offsets = data.ReadArray<Vector3>(); I'm using the latest ...
by MaximumFirecracker
Thu Dec 29, 2016 5:50 pm
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Request - Write / Read from memory
Replies: 7
Views: 15953

Re: Request - Write / Read from memory

Any particular reason ReadAll and these create methods are undocumented?
by MaximumFirecracker
Thu Dec 29, 2016 2:56 am
Forum: (Legacy) Easy Save 2 General Discussion
Topic: Request - Write / Read from memory
Replies: 7
Views: 15953

Re: Request - Write / Read from memory

Can you show an explicit example how this is used? I'm having trouble getting it to work. I can't find any stream property of ES2Writer instance, and I can't find anything in the docs.

What I want to do is write to memory, and then read all that from memory into ES2Data.