PSO2-Aqua-Library
PSO2-Aqua-Library copied to clipboard
Optimize UTF-16 string read
Optimized ReadUTF16String() using code based on the example at https://learn.microsoft.com/en-us/dotnet/api/system.text.decoder.convert?view=net-8.0. This reduces the time to run ReferenceGenerator.ReadCMXText() from 48 seconds to under 1 second on my PC.
A similar change could probably be made to improve the other string read functions, but ReadUTF16String() was the only one I saw getting used a significant amount when reading CMX data, so I didn't change the others.