Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }
Example #3
0
        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);
            }
        }
Example #4
0
        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);
            }
        }