mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 21:36:43 -05:00
Speed up text retrieval
Linq toarray kinda slow
This commit is contained in:
@@ -76,7 +76,8 @@ public string[] Lines
|
||||
LineInfo[] lines = LineOffsets;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
byte[] EncryptedLineData = Data.Skip(lines[i].Offset).Take(lines[i].Length * 2).ToArray();
|
||||
byte[] EncryptedLineData = new byte[lines[i].Length * 2];
|
||||
Array.Copy(Data, lines[i].Offset, EncryptedLineData, 0, EncryptedLineData.Length);
|
||||
byte[] DecryptedLineData = cryptLineData(EncryptedLineData, key);
|
||||
result[i] = getLineString(DecryptedLineData);
|
||||
key += KEY_ADVANCE;
|
||||
|
||||
Reference in New Issue
Block a user