public bool TryGetSubrecordMemoryFrame(IBinaryReadStream stream, RecordType targetType, out SubrecordMemoryFrame frame, bool readSafe = true) { if (!TryGetSubrecord(stream, targetType, out var meta)) { frame = default; return(false); } frame = new SubrecordMemoryFrame(meta, stream.GetMemory(meta.TotalLength, readSafe)); return(true); }
public bool TryGetGroupMemoryFrame(IBinaryReadStream stream, out GroupMemoryFrame frame, int offset = 0, bool checkIsGroup = true, bool readSafe = false) { if (!TryGetGroup(stream, out var meta, offset: offset, checkIsGroup: checkIsGroup)) { frame = default; return(false); } frame = new GroupMemoryFrame(meta, stream.GetMemory(checked ((int)meta.TotalLength), readSafe: readSafe)); return(true); }
public SubrecordMemoryFrame GetSubrecordMemoryFrame(IBinaryReadStream stream, int offset = 0, bool readSafe = true) { var meta = GetSubrecord(stream, offset); return(new SubrecordMemoryFrame(meta, stream.GetMemory(meta.TotalLength, offset: offset, readSafe))); }
public GroupMemoryFrame GetGroupMemoryFrame(IBinaryReadStream stream, int offset = 0, bool readSafe = false) { var meta = GetGroup(stream, offset); return(new GroupMemoryFrame(meta, stream.GetMemory(checked ((int)meta.TotalLength), offset: offset, readSafe: readSafe))); }
public VariableHeader GetVariableMeta(IBinaryReadStream stream, int offset = 0) => new VariableHeader(this, stream.GetMemory(this.HeaderLength, offset));