private void getFolderHeaderData(Folder _f, ref List <byte> _list) { _list.AddRange(Utils.serializeString(_f.getName())); _list.AddRange(BitConverter.GetBytes((UInt32)_f.getAssets().Count)); foreach (Asset a in _f.getAssets()) { _list.AddRange(Utils.serializeString(a.getName())); _list.AddRange(BitConverter.GetBytes((UInt32)a.getStart())); _list.AddRange(BitConverter.GetBytes((UInt32)a.getSize())); } _list.AddRange(BitConverter.GetBytes((UInt32)_f.getSubFolders().Count())); foreach (Folder f in _f.getSubFolders()) { getFolderHeaderData(f, ref _list); } }
private void getAssetBinaryBlob(Folder _f, ref UInt32 _offset, ref List <byte> _list) { foreach (Asset a in _f.getAssets()) { a.setStart(_offset); _offset += a.getSize(); _list.AddRange(a.getBytes()); } foreach (Folder f in _f.getSubFolders()) { getAssetBinaryBlob(f, ref _offset, ref _list); } }
private void getFolderHeaderData(Folder _f, ref List<byte> _list) { _list.AddRange(Utils.serializeString(_f.getName())); _list.AddRange(BitConverter.GetBytes((UInt32)_f.getAssets().Count)); foreach(Asset a in _f.getAssets()) { _list.AddRange(Utils.serializeString(a.getName())); _list.AddRange(BitConverter.GetBytes((UInt32)a.getStart())); _list.AddRange(BitConverter.GetBytes((UInt32)a.getSize())); } _list.AddRange(BitConverter.GetBytes((UInt32)_f.getSubFolders().Count())); foreach(Folder f in _f.getSubFolders()) { getFolderHeaderData(f, ref _list); } }
private void getAssetBinaryBlob(Folder _f, ref UInt32 _offset, ref List<byte> _list) { foreach (Asset a in _f.getAssets()) { a.setStart(_offset); _offset += a.getSize(); _list.AddRange(a.getBytes()); } foreach (Folder f in _f.getSubFolders()) { getAssetBinaryBlob(f, ref _offset, ref _list); } }