Ejemplo n.º 1
0
        public void UnpackFiles(Stream strm, Callbacks callbacks)
        {
            XORStream xstrm = new XORStream(strm, callbacks.TransformerRegistry, 0xf7);

            foreach (ArcEntry ae in GetDirectory(xstrm, false))
            {
                xstrm.Seek(ae.Offset, SeekOrigin.Begin);
                byte[] buf = new byte[ae.Length];
                xstrm.Read(buf, 0, ae.Length);
                callbacks.WriteData(ae.FileName, buf);
            }
        }
Ejemplo n.º 2
0
        public IEnumerable<FileEntry> ListFiles(Stream strm, Callbacks callbacks)
        {
            List<FileEntry> results = new List<FileEntry>();
            XORStream xstrm = new XORStream(strm, callbacks.TransformerRegistry, 0xf7);

            foreach (ArcEntry ae in GetDirectory(xstrm, false))
            {
                FileEntry fe = new FileEntry();
                fe.Filename = ae.FileName;
                fe.UncompressedSize = ae.Length;
                results.Add(fe);
            }

            return results;
        }
Ejemplo n.º 3
0
 public bool IsSupported(Stream strm, Callbacks callbacks)
 {
     XORStream xstrm = new XORStream(strm, callbacks.TransformerRegistry, 0xf7);
     return GetDirectory(xstrm, true) != null;
 }