Пример #1
0
        public void BuildArchive(string arcPath, string workingPath)
        {
            global::System.IO.MemoryStream memoryStream = new global::System.IO.MemoryStream();
            global::System.Collections.Generic.List <ARC_Studio.Workers.ARC.ArcEntry> list = new global::System.Collections.Generic.List <ARC_Studio.Workers.ARC.ArcEntry>();
            global::System.Collections.Generic.List <string> list2 = this.method_4(workingPath);
            foreach (string text in list2)
            {
                byte[] array = global::ARC_Studio.Workers.ARC.FileUtils.smethod_0(text);
                int    size  = array.Length;
                int    pos   = (int)memoryStream.Position;
                string name  = text.Substring(workingPath.Length);
                memoryStream.Write(array, 0, array.Length);
                ARC_Studio.Workers.ARC.ArcEntry item = new ARC_Studio.Workers.ARC.ArcEntry(name, size, pos);
                list.Add(item);
            }
            global::System.IO.MemoryStream memoryStream2 = this.method_3(list);
            int num = (int)memoryStream2.Length;

            foreach (ARC_Studio.Workers.ARC.ArcEntry arcEntry in list)
            {
                arcEntry.Pos += num;
            }
            memoryStream2 = this.method_3(list);
            this.method_2(arcPath, memoryStream2, memoryStream);
        }
Пример #2
0
 public void ExtractArchive(string arcPath, string workingPath)
 {
     global::System.Collections.Generic.List <ARC_Studio.Workers.ARC.ArcEntry> list = new global::System.Collections.Generic.List <ARC_Studio.Workers.ARC.ArcEntry>();
     byte[] array = global::ARC_Studio.Workers.ARC.FileUtils.smethod_0(arcPath);
     global::System.IO.MemoryStream memoryStream = null;
     if (array != null)
     {
         memoryStream = new global::System.IO.MemoryStream(array);
         int num = this.class47_0.method_4(memoryStream);
         for (int i = 0; i < num; i++)
         {
             string name = this.method_0(memoryStream);
             int    pos  = this.class47_0.method_4(memoryStream);
             int    size = this.class47_0.method_4(memoryStream);
             ARC_Studio.Workers.ARC.ArcEntry item = new ARC_Studio.Workers.ARC.ArcEntry(name, size, pos);
             list.Add(item);
         }
     }
     this.method_1(workingPath, list, memoryStream);
 }