public RobloxBinaryChunk(RobloxBinaryReader reader) { byte[] bChunkType = reader.ReadBytes(4); ChunkType = Encoding.ASCII.GetString(bChunkType); CompressedSize = reader.ReadInt32(); Size = reader.ReadInt32(); Reserved = reader.ReadBytes(4); if (HasCompressedData) { CompressedData = reader.ReadBytes(CompressedSize); Data = LZ4Codec.Decode(CompressedData, 0, CompressedSize, Size); } else { Data = reader.ReadBytes(Size); } }
public META(RobloxBinaryChunk chunk) { using (RobloxBinaryReader reader = chunk.GetReader("META")) { NumEntries = reader.ReadInt32(); Entries = new Dictionary <string, string>(NumEntries); for (int i = 0; i < NumEntries; i++) { string key = reader.ReadString(); string value = reader.ReadString(); Entries.Add(key, value); } } }
public PROP(RobloxBinaryChunk chunk) { Reader = chunk.GetReader("PROP"); TypeIndex = Reader.ReadInt32(); Name = Reader.ReadString(); try { byte propType = Reader.ReadByte(); Type = (PropertyType)propType; } catch { Type = PropertyType.Unknown; } }