Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GZipOutputStream is the destination and not the source #741

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 61 additions & 61 deletions help/api/ICSharpCode.SharpZipLib.GZip.GZipOutputStream.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-default ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<nav id="autocollapse" class="navbar navbar-default ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
Expand All @@ -71,9 +71,9 @@

<h1 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream" class="text-break">Class GZipOutputStream
</h1>
<div class="markdown level0 summary"><p>This filter stream is used to compress a stream into a &quot;GZIP&quot; stream.
The &quot;GZIP&quot; format is described in RFC 1952.</p>
<p>author of the original java version : John Leuner</p>
<div class="markdown level0 summary"><p>This filter stream is used to compress a stream into a &quot;GZIP&quot; stream.
The &quot;GZIP&quot; format is described in RFC 1952.</p>
<p>author of the original java version : John Leuner</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
Expand Down Expand Up @@ -149,25 +149,25 @@ <h5 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_syntax">Syntax</h5>
<pre><code class="lang-csharp hljs">public class GZipOutputStream : DeflaterOutputStream</code></pre>
</div>
<h5 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_examples"><strong>Examples</strong></h5>
<p>This sample shows how to gzip a file</p>
<pre><code>using System;
using System.IO;

using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Core;

class MainClass
{
public static void Main(string[] args)
{
using (Stream s = new GZipOutputStream(File.Create(args[0] + &quot;.gz&quot;)))
using (FileStream fs = File.OpenRead(args[0])) {
byte[] writeData = new byte[4096];
Streamutils.Copy(s, fs, writeData);
}
}
}
}</code></pre>
<p>This sample shows how to gzip a file</p>
<pre><code>using System;
using System.IO;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Core;
class MainClass
{
public static void Main(string[] args)
{
using (Stream out = new GZipOutputStream(File.Create(args[0] + &quot;.gz&quot;)))
using (FileStream in = File.OpenRead(args[0])) {
byte[] writeData = new byte[4096];
StreamUtils.Copy(in, out, writeData);
}
}
}
}</code></pre>

<h3 id="constructors">Constructors
</h3>
Expand All @@ -180,7 +180,7 @@ <h3 id="constructors">Constructors
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream__ctor_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.#ctor*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream__ctor_Stream_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.#ctor(Stream)">GZipOutputStream(Stream)</h4>
<div class="markdown level1 summary"><p>Creates a GzipOutputStream with the default buffer size</p>
<div class="markdown level1 summary"><p>Creates a GzipOutputStream with the default buffer size</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -200,7 +200,7 @@ <h5 class="parameters">Parameters</h5>
<tr>
<td><span class="xref">Stream</span></td>
<td><span class="parametername">baseOutputStream</span></td>
<td><p>The stream to read data (to be compressed) from</p>
<td><p>The stream to read data (to be compressed) from</p>
</td>
</tr>
</tbody>
Expand All @@ -214,7 +214,7 @@ <h5 class="parameters">Parameters</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream__ctor_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.#ctor*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream__ctor_Stream_System_Int32_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.#ctor(Stream,System.Int32)">GZipOutputStream(Stream, Int32)</h4>
<div class="markdown level1 summary"><p>Creates a GZipOutputStream with the specified buffer size</p>
<div class="markdown level1 summary"><p>Creates a GZipOutputStream with the specified buffer size</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -234,13 +234,13 @@ <h5 class="parameters">Parameters</h5>
<tr>
<td><span class="xref">Stream</span></td>
<td><span class="parametername">baseOutputStream</span></td>
<td><p>The stream to read data (to be compressed) from</p>
<td><p>The stream to read data (to be compressed) from</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">size</span></td>
<td><p>Size of the buffer to use</p>
<td><p>Size of the buffer to use</p>
</td>
</tr>
</tbody>
Expand All @@ -255,7 +255,7 @@ <h3 id="fields">Fields
<a href="https://github.com/icsharpcode/SharpZipLib/blob/1b1ab013ce1df02d8f27cf582197759c614d9126/src/ICSharpCode.SharpZipLib/GZip/GzipOutputStream.cs/#L53">View Source</a>
</span>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_crc" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.crc">crc</h4>
<div class="markdown level1 summary"><p>CRC-32 value for uncompressed data</p>
<div class="markdown level1 summary"><p>CRC-32 value for uncompressed data</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand Down Expand Up @@ -288,7 +288,7 @@ <h3 id="properties">Properties
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_FileName_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.FileName*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_FileName" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.FileName">FileName</h4>
<div class="markdown level1 summary"><p>Original filename</p>
<div class="markdown level1 summary"><p>Original filename</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand Down Expand Up @@ -321,8 +321,8 @@ <h3 id="methods">Methods
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Dispose_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Dispose*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Dispose_System_Boolean_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"><p>Writes remaining compressed output data to the output stream
and closes it.</p>
<div class="markdown level1 summary"><p>Writes remaining compressed output data to the output stream
and closes it.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand Down Expand Up @@ -357,7 +357,7 @@ <h5 class="overrides">Overrides</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Finish_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Finish*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Finish" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Finish">Finish()</h4>
<div class="markdown level1 summary"><p>Finish compression and write any footer information required to stream</p>
<div class="markdown level1 summary"><p>Finish compression and write any footer information required to stream</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -375,8 +375,8 @@ <h5 class="overrides">Overrides</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Flush_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Flush*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Flush" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Flush">Flush()</h4>
<div class="markdown level1 summary"><p>Flushes the stream by ensuring the header is written, and then calling <a class="xref" href="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream.html#ICSharpCode_SharpZipLib_Zip_Compression_Streams_DeflaterOutputStream_Flush">Flush()</a>
on the deflater.</p>
<div class="markdown level1 summary"><p>Flushes the stream by ensuring the header is written, and then calling <a class="xref" href="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream.html#ICSharpCode_SharpZipLib_Zip_Compression_Streams_DeflaterOutputStream_Flush">Flush()</a>
on the deflater.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -394,7 +394,7 @@ <h5 class="overrides">Overrides</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_GetLevel_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.GetLevel*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_GetLevel" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.GetLevel">GetLevel()</h4>
<div class="markdown level1 summary"><p>Get the current compression level.</p>
<div class="markdown level1 summary"><p>Get the current compression level.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -412,7 +412,7 @@ <h5 class="returns">Returns</h5>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The current compression level.</p>
<td><p>The current compression level.</p>
</td>
</tr>
</tbody>
Expand All @@ -426,8 +426,8 @@ <h5 class="returns">Returns</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_SetLevel_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.SetLevel*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_SetLevel_System_Int32_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.SetLevel(System.Int32)">SetLevel(Int32)</h4>
<div class="markdown level1 summary"><p>Sets the active compression level (0-9). The new level will be activated
immediately.</p>
<div class="markdown level1 summary"><p>Sets the active compression level (0-9). The new level will be activated
immediately.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -447,7 +447,7 @@ <h5 class="parameters">Parameters</h5>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">level</span></td>
<td><p>The compression level to set.</p>
<td><p>The compression level to set.</p>
</td>
</tr>
</tbody>
Expand All @@ -461,7 +461,7 @@ <h5 class="parameters">Parameters</h5>
</span>
<a id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Write_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Write*"></a>
<h4 id="ICSharpCode_SharpZipLib_GZip_GZipOutputStream_Write_System_Byte___System_Int32_System_Int32_" data-uid="ICSharpCode.SharpZipLib.GZip.GZipOutputStream.Write(System.Byte[],System.Int32,System.Int32)">Write(Byte[], Int32, Int32)</h4>
<div class="markdown level1 summary"><p>Write given buffer to output updating crc</p>
<div class="markdown level1 summary"><p>Write given buffer to output updating crc</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
Expand All @@ -481,19 +481,19 @@ <h5 class="parameters">Parameters</h5>
<tr>
<td><span class="xref">System.Byte</span>[]</td>
<td><span class="parametername">buffer</span></td>
<td><p>Buffer to write</p>
<td><p>Buffer to write</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">offset</span></td>
<td><p>Offset of first byte in buf to write</p>
<td><p>Offset of first byte in buf to write</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">count</span></td>
<td><p>Number of bytes to write</p>
<td><p>Number of bytes to write</p>
</td>
</tr>
</tbody>
Expand Down