// this is an artifact from implementing the reverse-engineered code as-is; since Caesar loads all objects in a greedy strategy (for serialization), // use of ReadCBFWithOffset should be discontinued public static int ReadCBFWithOffset(int memberIndex, StructureName structureName, byte[] input) { int byteOffset = CaesarStructure.GetCBFOffset(memberIndex, structureName, input); using (BinaryReader reader = new BinaryReader(new MemoryStream(input))) { byte[] layout = CaesarStructure.GetCaesarLayout(structureName); return(CaesarReader.ReadIntWithSize(reader, layout[memberIndex], byteOffset)); } }