Exemplo n.º 1
0
 internal static IEnumerable <TarEntry> GetEntries(StreamingMode mode, Stream stream, CompressionType compressionType)
 {
     foreach (TarHeader h in TarHeaderFactory.ReadHeader(mode, stream))
     {
         if (h != null)
         {
             if (mode == StreamingMode.Seekable)
             {
                 yield return(new TarEntry(new TarFilePart(h, stream), compressionType));
             }
             else
             {
                 yield return(new TarEntry(new TarFilePart(h, null), compressionType));
             }
         }
     }
 }
Exemplo n.º 2
0
        internal static IEnumerable <TarEntry> GetEntries(StreamingMode mode, Stream stream, SharpCompress.Common.CompressionType compressionType)
        {
            foreach (TarHeader iteratorVariable0 in TarHeaderFactory.ReadHeader(mode, stream))
            {
                if (iteratorVariable0 == null)
                {
                    continue;
                }
                if (mode == StreamingMode.Seekable)
                {
                    yield return(new TarEntry(new TarFilePart(iteratorVariable0, stream), compressionType));

                    continue;
                }
                yield return(new TarEntry(new TarFilePart(iteratorVariable0, null), compressionType));
            }
        }