public static Box Decode(byte[] data) { using (var ms = new MemoryStream(data)) { return(Box.FromStream(ms)); } }
public static T Decode <T>(byte[] data) where T : Box { using (var ms = new MemoryStream(data)) { return((T)Box.FromStream(ms)); } }
protected virtual void LoadChildrenFromStream(Stream stream) { Trace.Indent(); while ((ulong)stream.Position < Offset + EffectiveSize) { Box box = Box.FromStream(stream); if (box != null) { ((ISuperBox)this).Children.Add(box); } else { break; } } Trace.Unindent(); }