Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>i dont get your question but If you just wanna zip your file you can use <a href="http://www.icsharpcode.net/opensource/sharpziplib/" rel="nofollow">this</a></p> <p><strong>Update</strong> : You could use GZipStream in the System.IO.Compression namespace</p> <p>.NET 2.0.</p> <pre><code>Public Shared Sub CompressFile(path As String) Dim sourceFile As FileStream = File.OpenRead(path) Dim destinationFile As FileStream = File.Create(path &amp; ".gz") Dim buffer As Byte() = New Byte(sourceFile.Length - 1) {} sourceFile.Read(buffer, 0, buffer.Length) Using output As New GZipStream(destinationFile, CompressionMode.Compress) Console.WriteLine("Compressing {0} to {1}.",sourceFile.Name,destinationFile.Name, False) output.Write(buffer, 0, buffer.Length) End Using ' Close the files. sourceFile.Close() destinationFile.Close() End Sub </code></pre> <p>.NET 4</p> <pre><code>Public Shared Sub Compress(fi As FileInfo) ' Get the stream of the source file. Using inFile As FileStream = fi.OpenRead() ' Prevent compressing hidden and ' already compressed files. If (File.GetAttributes(fi.FullName) And FileAttributes.Hidden) &lt;&gt; FileAttributes.Hidden And fi.Extension &lt;&gt; ".gz" Then ' Create the compressed file. Using outFile As FileStream = File.Create(Convert.ToString(fi.FullName) &amp; ".gz") Using Compress As New GZipStream(outFile, CompressionMode.Compress) ' Copy the source file into ' the compression stream. inFile.CopyTo(Compress) Console.WriteLine("Compressed {0} from {1} to {2} bytes.", fi.Name, fi.Length.ToString(), outFile.Length.ToString()) End Using End Using End If End Using End Sub </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload