Beispiel #1
0
        private static RadArchivePackage DecompressFile(string fileName, Type type)
        {
            if (!File.Exists(fileName))
            {
                return((RadArchivePackage)null);
            }
            FileStream fileStream = (FileStream)null;

            try
            {
                fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read);
                if ((object)type != null)
                {
                    return(RadArchivePackage.Decompress((Stream)fileStream, type));
                }
                return(RadArchivePackage.Decompress((Stream)fileStream));
            }
            catch (Exception ex)
            {
                return((RadArchivePackage)null);
            }
            finally
            {
                fileStream?.Close();
            }
        }
Beispiel #2
0
 public static RadArchivePackage Decompress(Stream stream, Type type)
 {
     return(RadArchivePackage.DecompressXML(stream, type));
 }
Beispiel #3
0
 public static RadArchivePackage Decompress(string fileName, Type type)
 {
     return(RadArchivePackage.DecompressFile(fileName, type));
 }
Beispiel #4
0
 public static RadArchivePackage Decompress(Stream stream)
 {
     return(RadArchivePackage.DecompressBinary(stream));
 }