Exemple #1
0
 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);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
        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)));
        }
Exemple #4
0
        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)));
        }
Exemple #5
0
 public VariableHeader GetVariableMeta(IBinaryReadStream stream, int offset = 0) => new VariableHeader(this, stream.GetMemory(this.HeaderLength, offset));