using System.Collections.Generic; using System.IO; using System.Text; namespace SongCore.Arcache { public static class LengthPack { public static Dictionary Read(string filePath) { var bufLz4 = File.ReadAllBytes(filePath); var bufRaw = Lz4ArchiveBase.DecompressPickle(bufLz4); var dic = new Dictionary(); var ms = new MemoryStream(bufRaw); var reader = new BinaryReader(ms, Encoding.UTF8); while (ms.Position < ms.Length) { var ar = reader.ReadString().ToLower(); dic[ar] = reader.ReadSingle(); } return dic; } } }