Пример #1
0
            public static object /*!*/ Finish(GZipFile /*!*/ self)
            {
                object io = self.GetWrapper().UnderlyingObject;

                self.Close(closeUnderlyingObject: false);
                return(io);
            }
Пример #2
0
            public static object Wrap(BinaryOpStorage /*!*/ newStorage, UnaryOpStorage /*!*/ closeStorage,
                                      BlockParam block, RubyClass /*!*/ self, object io)
            {
                var      newSite  = newStorage.GetCallSite("new");
                GZipFile gzipFile = (GZipFile)newSite.Target(newSite, self, io);

                return(gzipFile.Do(block));
            }
Пример #3
0
        private void decompressButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog {
                Title = "Select a GZip File", CheckFileExists = true, CheckPathExists = true, DefaultExt = "gz", Filter = "GZip files (*.gz)|*.gz", RestoreDirectory = true
            };

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            var gzipFileName = dialog.FileName;
            var waveFileName = gzipFileName + ".wav";

            GZipFile.Decompress(DecompressionFormat.Wave, gzipFileName, waveFileName);
            FileInfo sourceFileInfo = new FileInfo(gzipFileName);
            FileInfo targetFileInfo = new FileInfo(waveFileName);
            var      msg            = $"Decompressed {sourceFileInfo.Name} from {sourceFileInfo.Length.ToString()} to {targetFileInfo.Length.ToString()} bytes.";

            MessageBox.Show(msg, Text);
        }
Пример #4
0
 public static MutableString OriginalName(GZipFile/*!*/ self)
 {
     throw new NotImplementedError();
 }
Пример #5
0
 public static bool IsClosed(GZipFile/*!*/ self)
 {
     return self.IsClosed();
 }
Пример #6
0
 public static object Finish(GZipFile/*!*/ self)
 {
     object io = self.GetWrapper().UnderlyingObject;
     self.Close(closeUnderlyingObject: false);
     return io;
 }
Пример #7
0
 public static MutableString Comment(GZipFile/*!*/ self)
 {
     throw new NotImplementedError();
 }
Пример #8
0
 public static MutableString OriginalName(GZipFile /*!*/ self)
 {
     throw new NotImplementedError();
 }
Пример #9
0
 public static MutableString Comment(GZipFile /*!*/ self)
 {
     throw new NotImplementedError();
 }
Пример #10
0
 public static bool IsClosed(GZipFile /*!*/ self)
 {
     return(self.IsClosed());
 }