Example #1
0
        public void Extract(string newFileName)
        {
            // Move to the record
            stream.Seek(headerOffset, SeekOrigin.Begin);

            // Read the record
            ZipFileRecord record = new ZipFileRecord(stream);

            // Decompress our data
            byte[] buffer = record.DecompressData();

            // Create and write our file
            FileStream fs = new FileStream(newFileName, FileMode.Create,
                                           FileAccess.Write);

            fs.Write(buffer, 0, buffer.Length);
            fs.Close();
        }
Example #2
0
        public void Extract(string newFileName)
        {
            // Move to the record
            stream.Seek(headerOffset, SeekOrigin.Begin);

            // Read the record
            ZipFileRecord record = new ZipFileRecord(stream);

            // Decompress our data
            byte[] buffer = record.DecompressData();

            // Create and write our file
            FileStream fs = new FileStream(newFileName, FileMode.Create,
                FileAccess.Write);
            fs.Write(buffer, 0, buffer.Length);
            fs.Close();
        }