ICSharpCode.SharpZipLib

An NDoc Documented Class Library

ICSharpCode.SharpZipLib Namespace

Namespace hierarchy

Classes

Class | Description
ZipException | Is thrown during the creation or input of a zip file.


ZipException Class

Is thrown during the creation or input of a zip file.

For a list of all members of this type, see ZipException Members.

System.Object
Exception
ZipException

[Visual Basic]
Public Class ZipException
   Inherits Exception
   Implements ISerializable
[C#]
public class ZipException : Exception, ISerializable

Requirements

Namespace: ICSharpCode.SharpZipLib Namespace

Assembly: SharpZipLib.dll

See Also

ZipException Members | ICSharpCode.SharpZipLib Namespace


ZipException Members

Public Instance Constructors

ZipException Overloaded. Initialize a new instance of the ZipException class.

Public Instance Properties

HelpLink (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
InnerException (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
Message (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
Source (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
StackTrace (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
TargetSite (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBaseException (inherited from Exception) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetObjectData (inherited from Exception) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Exception) | Select the method name to go to the Microsoft documentation.

Protected Instance Properties

HResult (inherited from System.Exception) Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipException Class | ICSharpCode.SharpZipLib Namespace


ZipException Constructor

An NDoc Documented Class Library

ZipException

Initializes a new instance of the ZipException class with default properties.

Overload List

Initializes a new instance of the ZipException class with default properties.

public ZipException();

Initializes a new instance of the ZipException class with a specified error message.

public ZipException(string);

See Also

ZipException Class | ZipException Members | ICSharpCode.SharpZipLib Namespace


ZipException Constructor ()

Initializes a new instance of the ZipException class with default properties.

[Visual Basic]
Overloads Public Sub New()
[C#]
public ZipException();

See Also

ZipException Class | ZipException Members | ICSharpCode.SharpZipLib Namespace | ZipException Constructor Overload List


ZipException Constructor (String)

Initializes a new instance of the ZipException class with a specified error message.

[Visual Basic]
Overloads Public Sub New( _
   ByVal msg As String _
)
[C#]
public ZipException(
   string msg
);

See Also

ZipException Class | ZipException Members | ICSharpCode.SharpZipLib Namespace | ZipException Constructor Overload List


ICSharpCode.SharpZipLib.BZip2

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.BZip2 Namespace

Namespace hierarchy

Classes

Class | Description
BZip2 | Does all the compress and decompress pre-operation stuff. Sets up the streams and file header characters. Uses multiply overloaded methods to call for the compress/decompress.
BZip2Constants | Base class for both the compress and decompress classes. Holds common arrays, and static data.
BZip2InputStream | An input stream that decompresses from the BZip2 format (without the file header chars) to be read as any other stream.
BZip2OutputStream | An output stream that compresses into the BZip2 format (without the file header chars) into another stream. TODO: Update to BZip2 1.0.1, 1.0.2


BZip2 Class

Does all the compress and decompress pre-operation stuff. Sets up the streams and file header characters. Uses multiply overloaded methods to call for the compress/decompress.

For a list of all members of this type, see BZip2 Members.

System.Object
BZip2

[Visual Basic]
NotInheritable Public Class BZip2
[C#]
public sealed class BZip2

Requirements

Namespace: ICSharpCode.SharpZipLib.BZip2 Namespace

Assembly: SharpZipLib.dll

See Also

BZip2 Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2 Members

Public Static (Shared) Methods

Compress
Decompress

Public Instance Constructors

BZip2 Constructor

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

BZip2 Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2 Constructor

[Visual Basic]
Public Sub New()
[C#]
public BZip2();

See Also

BZip2 Class | BZip2 Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2 Methods

The methods of the BZip2 class are listed below. For a complete list of BZip2 class members, see the BZip2 Members topic.

Public Static (Shared) Methods

Compress
Decompress

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

BZip2 Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2.Compress Method

[Visual Basic]
Public Shared Sub Compress( _
   ByVal instream As System.IO.Stream, _
   ByVal outstream As System.IO.Stream, _
   ByVal blockSize As Integer _
)
[C#]
public static void Compress(
   Stream instream,
   Stream outstream,
   int blockSize
);

See Also

BZip2 Class | BZip2 Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2.Decompress Method

[Visual Basic]
Public Shared Sub Decompress( _
   ByVal instream As System.IO.Stream, _
   ByVal outstream As System.IO.Stream _
)
[C#]
public static void Decompress(
   Stream instream,
   Stream outstream
);

See Also

BZip2 Class | BZip2 Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants Class

Base class for both the compress and decompress classes. Holds common arrays, and static data.

For a list of all members of this type, see BZip2Constants Members.

System.Object
BZip2Constants

[Visual Basic]
NotInheritable Public Class BZip2Constants
[C#]
public sealed class BZip2Constants

Requirements

Namespace: ICSharpCode.SharpZipLib.BZip2 Namespace

Assembly: SharpZipLib.dll

See Also

BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants Members

Public Static (Shared) Fields

baseBlockSize
G_SIZE
MAX_ALPHA_SIZE
MAX_CODE_LEN
MAX_SELECTORS
N_GROUPS
N_ITERS
NUM_OVERSHOOT_BYTES
rNums
RUNA
RUNB

Public Instance Constructors

BZip2Constants Constructor

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

BZip2Constants Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants Constructor

[Visual Basic]
Public Sub New()
[C#]
public BZip2Constants();

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants Fields

The fields of the BZip2Constants class are listed below. For a complete list of BZip2Constants class members, see the BZip2Constants Members topic.

Public Static (Shared) Fields

baseBlockSize
G_SIZE
MAX_ALPHA_SIZE
MAX_CODE_LEN
MAX_SELECTORS
N_GROUPS
N_ITERS
NUM_OVERSHOOT_BYTES
rNums
RUNA
RUNB

See Also

BZip2Constants Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.baseBlockSize Field

[Visual Basic]
Public Shared ReadOnly baseBlockSize As Integer
[C#]
public static readonly int baseBlockSize;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.G_SIZE Field

[Visual Basic]
Public Shared ReadOnly G_SIZE As Integer
[C#]
public static readonly int G_SIZE;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.MAX_ALPHA_SIZE Field

[Visual Basic]
Public Shared ReadOnly MAX_ALPHA_SIZE As Integer
[C#]
public static readonly int MAX_ALPHA_SIZE;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.MAX_CODE_LEN Field

[Visual Basic]
Public Shared ReadOnly MAX_CODE_LEN As Integer
[C#]
public static readonly int MAX_CODE_LEN;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.MAX_SELECTORS Field

[Visual Basic]
Public Shared ReadOnly MAX_SELECTORS As Integer
[C#]
public static readonly int MAX_SELECTORS;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.N_GROUPS Field

[Visual Basic]
Public Shared ReadOnly N_GROUPS As Integer
[C#]
public static readonly int N_GROUPS;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.N_ITERS Field

[Visual Basic]
Public Shared ReadOnly N_ITERS As Integer
[C#]
public static readonly int N_ITERS;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.NUM_OVERSHOOT_BYTES Field

[Visual Basic]
Public Shared ReadOnly NUM_OVERSHOOT_BYTES As Integer
[C#]
public static readonly int NUM_OVERSHOOT_BYTES;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.rNums Field

[Visual Basic]
Public Shared ReadOnly rNums As Integer()
[C#]
public static readonly int[] rNums;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.RUNA Field

[Visual Basic]
Public Shared ReadOnly RUNA As Integer
[C#]
public static readonly int RUNA;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2Constants.RUNB Field

[Visual Basic]
Public Shared ReadOnly RUNB As Integer
[C#]
public static readonly int RUNB;

See Also

BZip2Constants Class | BZip2Constants Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream Class

An input stream that decompresses from the BZip2 format (without the file header chars) to be read as any other stream.

For a list of all members of this type, see BZip2InputStream Members.

System.Object
MarshalByRefObject
Stream
BZip2InputStream

[Visual Basic]
Public Class BZip2InputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class BZip2InputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.BZip2 Namespace

Assembly: SharpZipLib.dll

See Also

BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream Members

Public Instance Constructors

BZip2InputStream Constructor

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read |
ReadByte |
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

BZip2InputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream Constructor

[Visual Basic]
Public Sub New( _
   ByVal zStream As System.IO.Stream _
)
[C#]
public BZip2InputStream(
   Stream zStream
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream Properties

The properties of the BZip2InputStream class are listed below. For a complete list of BZip2InputStream class members, see the BZip2InputStream Members topic.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

BZip2InputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream Methods

The methods of the BZip2InputStream class are listed below. For a complete list of BZip2InputStream class members, see the BZip2InputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read |
ReadByte |
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

BZip2InputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Close Method

Closes the input stream

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Flush Method

Flushes the baseInputStream

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Read Method

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.ReadByte Method

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.Write Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal array As Byte(), _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public override void Write(
   byte[] array,
   int offset,
   int count
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2InputStream.WriteByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal val As Byte _
)
[C#]
public override void WriteByte(
   byte val
);

See Also

BZip2InputStream Class | BZip2InputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream Class

An output stream that compresses into the BZip2 format (without the file header chars) into another stream. TODO: Update to BZip2 1.0.1, 1.0.2

For a list of all members of this type, see BZip2OutputStream Members.

System.Object
MarshalByRefObject
Stream
BZip2OutputStream

[Visual Basic]
Public Class BZip2OutputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class BZip2OutputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.BZip2 Namespace

Assembly: SharpZipLib.dll

See Also

BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream Members

Public Instance Constructors

BZip2OutputStream Overloaded. Initialize a new instance of the BZip2OutputStream class.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close |
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |
WriteByte |

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

BZip2OutputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream Constructor

An NDoc Documented Class Library

BZip2OutputStream

Overload List

public BZip2OutputStream(Stream);

public BZip2OutputStream(Stream,int);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream Constructor (Stream)

[Visual Basic]
Overloads Public Sub New( _
   ByVal inStream As System.IO.Stream _
)
[C#]
public BZip2OutputStream(
   Stream inStream
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace | BZip2OutputStream Constructor Overload List


BZip2OutputStream Constructor (Stream, Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal inStream As System.IO.Stream, _
   ByVal inBlockSize As Integer _
)
[C#]
public BZip2OutputStream(
   Stream inStream,
   int inBlockSize
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace | BZip2OutputStream Constructor Overload List


BZip2OutputStream Properties

The properties of the BZip2OutputStream class are listed below. For a complete list of BZip2OutputStream class members, see the BZip2OutputStream Members topic.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

BZip2OutputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream Methods

The methods of the BZip2OutputStream class are listed below. For a complete list of BZip2OutputStream class members, see the BZip2OutputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close |
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |
WriteByte |

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

BZip2OutputStream Class | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Close Method

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Finalize Method ()

[Visual Basic]
Overrides Overloads Protected Sub Finalize()
[C#]
protected override void Finalize();

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace | BZip2OutputStream.Finalize Overload List

BZip2OutputStream.Finalize Method ()
An NDoc Documented Class Library

BZip2OutputStream.Finalize Method ()

[Visual Basic]
Overloads Public Sub Finalize()
[C#]
public void Finalize();

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace | BZip2OutputStream.Finalize Overload List


BZip2OutputStream.Flush Method

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Read Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.ReadByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.Write Method

[Visual Basic]
Overrides Public Sub Write( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public override void Write(
   byte[] buf,
   int off,
   int len
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


BZip2OutputStream.WriteByte Method

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal bv As Byte _
)
[C#]
public override void WriteByte(
   byte bv
);

See Also

BZip2OutputStream Class | BZip2OutputStream Members | ICSharpCode.SharpZipLib.BZip2 Namespace


ICSharpCode.SharpZipLib.Checksums

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Checksums Namespace

Namespace hierarchy

Classes

Class | Description
Adler32 | Computes Adler32 checksum for a stream of data. An Adler32 checksum is not as reliable as a CRC32 checksum, but a lot faster to compute. The specification for Adler32 may be found in RFC 1950. ZLIB Compressed Data Format Specification version 3.3) From that document: "ADLER32 (Adler-32 checksum) This contains a checksum value of the uncompressed data (excluding any dictionary data) computed according to Adler-32 algorithm. This algorithm is a 32-bit extension and improvement of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 standard. Adler-32 is composed of two sums accumulated per byte: s1 is the sum of all bytes, s2 is the sum of all s1 values. Both sums are done modulo 65521. s1 is initialized to 1, s2 to zero. The Adler-32 checksum is stored as s2*65536 + s1 in most- significant-byte first (network) order." "8.2. The Adler-32 algorithm The Adler-32 algorithm is much faster than the CRC32 algorithm yet still provides an extremely low probability of undetected errors. The modulo on unsigned long accumulators can be delayed for 5552 bytes, so the modulo operation time is negligible. If the bytes are a, b, c, the second sum is 3a + 2b + c + 3, and so is position and order sensitive, unlike the first sum, which is just a checksum. That 65521 is prime is important to avoid a possible large class of two-byte errors that leave the check unchanged. (The Fletcher checksum uses 255, which is not prime and which also makes the Fletcher check insensitive to single byte changes 0 - 255.) The sum s1 is initialized to 1 instead of zero to make the length of the sequence part of s2, so that the length does not have to be checked separately. (Any sequence of zeroes has a Fletcher checksum of zero.)"
Crc32 | Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. Polynomials over GF(2) are represented in binary, one bit per coefficient, with the lowest powers in the most significant bit. Then adding polynomials is just exclusive-or, and multiplying a polynomial by x is a right shift by one. If we call the above polynomial p, and represent a byte as the polynomial q, also with the lowest power in the most significant bit (so the byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, where a mod b means the remainder after dividing a by b. This calculation is done using the shift-register method of multiplying and taking the remainder. The register is initialized to zero, and for each incoming bit, x^32 is added mod p to the register if the bit is a one (where x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x (which is shifting right by one and adding x^32 mod p if the bit shifted out is a one). We start with the highest power (least significant bit) of q and repeat for all eight bits of q. The table is simply the CRC of all possible eight bit values. This is all the information needed to generate CRC's on data a byte at a time for all combinations of CRC register values and incoming bytes.
StrangeCRC

Interfaces

Interface Description
IChecksum Interface to compute a data checksum used by checked input/output streams. A data checksum can be updated by one byte or with a byte array. After each update the value of the current checksum can be returned by calling
getValue
. The complete checksum object can also be reset so it can be used again with new data.


Adler32 Class

Computes Adler32 checksum for a stream of data. An Adler32 checksum is not as reliable as a CRC32 checksum, but a lot faster to compute. The specification for Adler32 may be found in RFC 1950. ZLIB Compressed Data Format Specification version 3.3) From that document: "ADLER32 (Adler-32 checksum) This contains a checksum value of the uncompressed data (excluding any dictionary data) computed according to Adler-32 algorithm. This algorithm is a 32-bit extension and improvement of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 standard. Adler-32 is composed of two sums accumulated per byte: s1 is the sum of all bytes, s2 is the sum of all s1 values. Both sums are done modulo 65521. s1 is initialized to 1, s2 to zero. The Adler-32 checksum is stored as s2*65536 + s1 in most- significant-byte first (network) order." "8.2. The Adler-32 algorithm The Adler-32 algorithm is much faster than the CRC32 algorithm yet still provides an extremely low probability of undetected errors. The modulo on unsigned long accumulators can be delayed for 5552 bytes, so the modulo operation time is negligible. If the bytes are a, b, c, the second sum is 3a + 2b + c + 3, and so is position and order sensitive, unlike the first sum, which is just a checksum. That 65521 is prime is important to avoid a possible large class of two-byte errors that leave the check unchanged. (The Fletcher checksum uses 255, which is not prime and which also makes the Fletcher check insensitive to single byte changes 0 - 255.) The sum s1 is initialized to 1 instead of zero to make the length of the sequence part of s2, so that the length does not have to be checked separately. (Any sequence of zeroes has a Fletcher checksum of zero.)"

For a list of all members of this type, see Adler32 Members.

System.Object
Adler32

[Visual Basic]
NotInheritable Public Class Adler32
   Implements IChecksum
[C#]
public sealed class Adler32 : IChecksum

Requirements

Namespace: ICSharpCode.SharpZipLib.Checksums Namespace

Assembly: SharpZipLib.dll

See Also

Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32 Members

Public Instance Constructors

Adler32 Constructor Creates a new instance of the
Adler32
class. The checksum starts off with a value of 1.

Public Instance Properties

Value Returns the Adler32 data checksum computed so far.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the Adler32 checksum to the initial value.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded. Updates the checksum with the bytes taken from the array.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Adler32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32 Constructor

Creates a new instance of the

Adler32
class. The checksum starts off with a value of 1.

[Visual Basic]
Public Sub New()
[C#]
public Adler32();

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32 Properties

The properties of the Adler32 class are listed below. For a complete list of Adler32 class members, see the Adler32 Members topic.

Public Instance Properties

Value Returns the Adler32 data checksum computed so far.

See Also

Adler32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32.Value Property

Returns the Adler32 data checksum computed so far.

[Visual Basic]
NotOverridable Public ReadOnly Property Value As Long
[C#]
public long Value {final get;}

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32 Methods

The methods of the Adler32 class are listed below. For a complete list of Adler32 class members, see the Adler32 Members topic.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the Adler32 checksum to the initial value.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded. Updates the checksum with the bytes taken from the array.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Adler32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32.Reset Method

Resets the Adler32 checksum to the initial value.

[Visual Basic]
NotOverridable Public Sub Reset()
[C#]
public final void Reset();

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Update Method

An NDoc Documented Class Library

Adler32.Update

Updates the checksum with the bytes taken from the array.

Overload List

Updates the checksum with the bytes taken from the array.

public final void Update(byte[],int,int);

Updates the checksum with the bytes taken from the array.

public final void Update(byte[]);

Updates the checksum with the byte b.

public final void Update(int);

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Adler32.Update Method (Byte[])

Updates the checksum with the bytes taken from the array.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buffer As Byte() _
)
[C#]
public final void Update(
   byte[] buffer
);

Parameters

buffer

buffer an array of bytes

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Adler32.Update Overload List


Adler32.Update Method (Byte[], Int32, Int32)

Updates the checksum with the bytes taken from the array.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public final void Update(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

an array of bytes

off

the start of the data used for this update

len

the number of bytes to use for this update

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Adler32.Update Overload List


Adler32.Update Method (Int32)

Updates the checksum with the byte b.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal bval As Integer _
)
[C#]
public final void Update(
   int bval
);

Parameters

bval

the data value to add. The high byte of the int is ignored.

See Also

Adler32 Class | Adler32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Adler32.Update Overload List


Crc32 Class

Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. Polynomials over GF(2) are represented in binary, one bit per coefficient, with the lowest powers in the most significant bit. Then adding polynomials is just exclusive-or, and multiplying a polynomial by x is a right shift by one. If we call the above polynomial p, and represent a byte as the polynomial q, also with the lowest power in the most significant bit (so the byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, where a mod b means the remainder after dividing a by b. This calculation is done using the shift-register method of multiplying and taking the remainder. The register is initialized to zero, and for each incoming bit, x^32 is added mod p to the register if the bit is a one (where x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x (which is shifting right by one and adding x^32 mod p if the bit shifted out is a one). We start with the highest power (least significant bit) of q and repeat for all eight bits of q. The table is simply the CRC of all possible eight bit values. This is all the information needed to generate CRC's on data a byte at a time for all combinations of CRC register values and incoming bytes.

For a list of all members of this type, see Crc32 Members.

System.Object
Crc32

[Visual Basic]
NotInheritable Public Class Crc32
   Implements IChecksum
[C#]
public sealed class Crc32 : IChecksum

Requirements

Namespace: ICSharpCode.SharpZipLib.Checksums Namespace

Assembly: SharpZipLib.dll

See Also

Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32 Members

Public Instance Constructors

Crc32 Constructor

Public Instance Properties

Value Returns the CRC32 data checksum computed so far.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the CRC32 data checksum as if no update was ever called.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded. Adds the byte array to the data checksum.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Crc32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32 Constructor

[Visual Basic]
Public Sub New()
[C#]
public Crc32();

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32 Properties

The properties of the Crc32 class are listed below. For a complete list of Crc32 class members, see the Crc32 Members topic.

Public Instance Properties

Value Returns the CRC32 data checksum computed so far.

See Also

Crc32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32.Value Property

Returns the CRC32 data checksum computed so far.

[Visual Basic]
NotOverridable Public ReadOnly Property Value As Long
[C#]
public long Value {final get;}

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32 Methods

The methods of the Crc32 class are listed below. For a complete list of Crc32 class members, see the Crc32 Members topic.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the CRC32 data checksum as if no update was ever called.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded. Adds the byte array to the data checksum.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Crc32 Class | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32.Reset Method

Resets the CRC32 data checksum as if no update was ever called.

[Visual Basic]
NotOverridable Public Sub Reset()
[C#]
public final void Reset();

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Update Method

An NDoc Documented Class Library

Crc32.Update

Updates the checksum with the bytes taken from the array.

Overload List

Adds the byte array to the data checksum.

public final void Update(byte[],int,int);

Updates the checksum with the bytes taken from the array.

public final void Update(byte[]);

Updates the checksum with the int bval.

public final void Update(int);

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace


Crc32.Update Method (Byte[])

Updates the checksum with the bytes taken from the array.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buffer As Byte() _
)
[C#]
public final void Update(
   byte[] buffer
);

Parameters

buffer

buffer an array of bytes

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Crc32.Update Overload List


Crc32.Update Method (Byte[], Int32, Int32)

Adds the byte array to the data checksum.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public final void Update(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

the buffer which contains the data

off

the offset in the buffer where the data starts

len

the length of the data

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Crc32.Update Overload List


Crc32.Update Method (Int32)

Updates the checksum with the int bval.

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal bval As Integer _
)
[C#]
public final void Update(
   int bval
);

Parameters

bval

the byte is taken as the lower 8 bits of bval

See Also

Crc32 Class | Crc32 Members | ICSharpCode.SharpZipLib.Checksums Namespace | Crc32.Update Overload List


IChecksum Interface

Interface to compute a data checksum used by checked input/output streams. A data checksum can be updated by one byte or with a byte array. After each update the value of the current checksum can be returned by calling

getValue
. The complete checksum object can also be reset so it can be used again with new data.

For a list of all members of this type, see IChecksum Members.

[Visual Basic]
Public Interface IChecksum
[C#]
public interface IChecksum

Requirements

Namespace: ICSharpCode.SharpZipLib.Checksums Namespace

Assembly: SharpZipLib.dll

See Also

IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum Members

Public Instance Properties

Value Returns the data checksum computed so far.

Public Instance Methods

Reset | Resets the data checksum as if no update was ever called.
Update | Overloaded. Adds the byte array to the data checksum.

See Also

IChecksum Interface | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum Properties

The properties of the IChecksum class are listed below. For a complete list of IChecksum class members, see the IChecksum Members topic.

Public Instance Properties

Value Returns the data checksum computed so far.

See Also

IChecksum Interface | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum.Value Property

Returns the data checksum computed so far.

[Visual Basic]
Property Value As Long
[C#]
long Value {get;}

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum Methods

The methods of the IChecksum class are listed below. For a complete list of IChecksum class members, see the IChecksum Members topic.

Public Instance Methods

Reset | Resets the data checksum as if no update was ever called.
Update | Overloaded. Adds the byte array to the data checksum.

See Also

IChecksum Interface | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum.Reset Method

Resets the data checksum as if no update was ever called.

[Visual Basic]
Sub Reset()
[C#]
void Reset();

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace


Update Method

An NDoc Documented Class Library

IChecksum.Update

Updates the data checksum with the bytes taken from the array.

Overload List

Adds the byte array to the data checksum.

void Update(byte[],int,int);

Updates the data checksum with the bytes taken from the array.

void Update(byte[]);

Adds one byte to the data checksum.

void Update(int);

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace


IChecksum.Update Method (Byte[])

Updates the data checksum with the bytes taken from the array.

[Visual Basic]
Sub Update( _
   ByVal buffer As Byte() _
)
[C#]
void Update(
   byte[] buffer
);

Parameters

buffer

buffer an array of bytes

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace | IChecksum.Update Overload List


IChecksum.Update Method (Byte[], Int32, Int32)

Adds the byte array to the data checksum.

[Visual Basic]
Sub Update( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
void Update(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

the buffer which contains the data

off

the offset in the buffer where the data starts

len

the length of the data

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace | IChecksum.Update Overload List


IChecksum.Update Method (Int32)

Adds one byte to the data checksum.

[Visual Basic]
Sub Update( _
   ByVal bval As Integer _
)
[C#]
void Update(
   int bval
);

Parameters

bval

the data value to add. The high byte of the int is ignored.

See Also

IChecksum Interface | IChecksum Members | ICSharpCode.SharpZipLib.Checksums Namespace | IChecksum.Update Overload List


StrangeCRC Class

For a list of all members of this type, see StrangeCRC Members.

System.Object
StrangeCRC

[Visual Basic]
Public Class StrangeCRC
   Implements IChecksum
[C#]
public class StrangeCRC : IChecksum

Requirements

Namespace: ICSharpCode.SharpZipLib.Checksums Namespace

Assembly: SharpZipLib.dll

See Also

StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC Members

Public Instance Constructors

StrangeCRC Constructor

Public Instance Properties

Value

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

StrangeCRC Class | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC Constructor

[Visual Basic]
Public Sub New()
[C#]
public StrangeCRC();

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC Properties

The properties of the StrangeCRC class are listed below. For a complete list of StrangeCRC class members, see the StrangeCRC Members topic.

Public Instance Properties

Value

See Also

StrangeCRC Class | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC.Value Property

[Visual Basic]
NotOverridable Public ReadOnly Property Value As Long
[C#]
public long Value {final get;}

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC Methods

The methods of the StrangeCRC class are listed below. For a complete list of StrangeCRC class members, see the StrangeCRC Members topic.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Update | Overloaded.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

StrangeCRC Class | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC.Reset Method

[Visual Basic]
NotOverridable Public Sub Reset()
[C#]
public final void Reset();

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace


Update Method

An NDoc Documented Class Library

StrangeCRC.Update

Overload List

public final void Update(byte[],int,int);

public final void Update(byte[]);

public final void Update(int);

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace


StrangeCRC.Update Method (Byte[])

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buf As Byte() _
)
[C#]
public final void Update(
   byte[] buf
);

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace | StrangeCRC.Update Overload List


StrangeCRC.Update Method (Byte[], Int32, Int32)

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public final void Update(
   byte[] buf,
   int off,
   int len
);

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace | StrangeCRC.Update Overload List


StrangeCRC.Update Method (Int32)

[Visual Basic]
NotOverridable Overloads Public Sub Update( _
   ByVal inCh As Integer _
)
[C#]
public final void Update(
   int inCh
);

See Also

StrangeCRC Class | StrangeCRC Members | ICSharpCode.SharpZipLib.Checksums Namespace | StrangeCRC.Update Overload List


ICSharpCode.SharpZipLib.GZip

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.GZip Namespace

Namespace hierarchy

Classes

Class | Description
GZipConstants | This class contains constants used for gzip.
GZipInputStream | This filter stream is used to decompress a "GZIP" format stream. The "GZIP" format is described baseInputStream RFC 1952. author of the original java version : John Leuner
GZipOutputStream | This filter stream is used to compress a stream into a "GZIP" stream. The "GZIP" format is described in RFC 1952. author of the original java version : John Leuner


GZipConstants Class

This class contains constants used for gzip.

For a list of all members of this type, see GZipConstants Members.

System.Object
GZipConstants

[Visual Basic]
Public Class GZipConstants
[C#]
public class GZipConstants

Requirements

Namespace: ICSharpCode.SharpZipLib.GZip Namespace

Assembly: SharpZipLib.dll

See Also

GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants Members

Public Static (Shared) Fields

FCOMMENT |
FEXTRA |
FHCRC |
FNAME |
FTEXT |
GZIP_MAGIC | Magic number found at start of GZIP header

Public Instance Constructors

GZipConstants Constructor

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

GZipConstants Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants Constructor

[Visual Basic]
Public Sub New()
[C#]
public GZipConstants();

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants Fields

The fields of the GZipConstants class are listed below. For a complete list of GZipConstants class members, see the GZipConstants Members topic.

Public Static (Shared) Fields

FCOMMENT |
FEXTRA |
FHCRC |
FNAME |
FTEXT |
GZIP_MAGIC | Magic number found at start of GZIP header

See Also

GZipConstants Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.FCOMMENT Field

[Visual Basic]
Public Shared FCOMMENT As Integer
[C#]
public static int FCOMMENT;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.FEXTRA Field

[Visual Basic]
Public Shared FEXTRA As Integer
[C#]
public static int FEXTRA;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.FHCRC Field

[Visual Basic]
Public Shared FHCRC As Integer
[C#]
public static int FHCRC;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.FNAME Field

[Visual Basic]
Public Shared FNAME As Integer
[C#]
public static int FNAME;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.FTEXT Field

[Visual Basic]
Public Shared FTEXT As Integer
[C#]
public static int FTEXT;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipConstants.GZIP_MAGIC Field

Magic number found at start of GZIP header

[Visual Basic]
Public Shared ReadOnly GZIP_MAGIC As Integer
[C#]
public static readonly int GZIP_MAGIC;

See Also

GZipConstants Class | GZipConstants Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream Class

This filter stream is used to decompress a "GZIP" format stream. The "GZIP" format is described baseInputStream RFC 1952. author of the original java version : John Leuner

For a list of all members of this type, see GZipInputStream Members.

System.Object
MarshalByRefObject
Stream
InflaterInputStream
GZipInputStream

[Visual Basic]
Public Class GZipInputStream
   Inherits InflaterInputStream
   Implements IDisposable
[C#]
public class GZipInputStream : InflaterInputStream, IDisposable

Example

This sample shows how to unzip a gzipped file

            using System;
            using System.IO;

            using NZlib.GZip;

            class MainClass
            {
                public static void Main(string[] args)
                {
                    Stream s = new GZipInputStream(File.OpenRead(args[0]));
                    FileStream fs = File.Create(Path.GetFileNameWithoutExtension(args[0]));
                    int size = 2048;
                    byte[] writeData = new byte[2048];
                    while (true) {
                        size = s.Read(writeData, 0, size);
                        if (size > 0) {
                            fs.Write(writeData, 0, size);
                        } else {
                            break;
                        }
                    }
                    s.Close();
                }
            }

Requirements

Namespace: ICSharpCode.SharpZipLib.GZip Namespace

Assembly: SharpZipLib.dll

See Also

GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream Members

Public Instance Constructors

GZipInputStream Overloaded. Initialize a new instance of the GZipInputStream class.

Public Instance Properties

Available (inherited from InflaterInputStream) | Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.
CanRead (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanSeek (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanWrite (inherited from InflaterInputStream) | I needed to implement the abstract member.
Length (inherited from InflaterInputStream) | I needed to implement the abstract member.
Position (inherited from InflaterInputStream) | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close (inherited from InflaterInputStream) | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush (inherited from InflaterInputStream) | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Reads uncompressed data into an array of bytes
ReadByte (inherited from InflaterInputStream) | Reads one byte of decompressed data. The byte is baseInputStream the lower 8 bits of the int.
Seek (inherited from InflaterInputStream) | I needed to implement the abstract member.
SetLength (inherited from InflaterInputStream) | I needed to implement the abstract member.
Skip (inherited from InflaterInputStream) | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write (inherited from InflaterInputStream) | I needed to implement the abstract member.
WriteByte (inherited from InflaterInputStream) | I needed to implement the abstract member.

Protected Instance Fields

baseInputStream |
buf |
crc | CRC-32 value for uncompressed data
eos | Indicates end of stream
inf |
len |

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill (inherited from InflaterInputStream) | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

GZipInputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream Constructor

An NDoc Documented Class Library

GZipInputStream

Creates a GzipInputStream with the default buffer size

Overload List

Creates a GzipInputStream with the default buffer size

public GZipInputStream(Stream);

Creates a GZIPInputStream with the specified buffer size

public GZipInputStream(Stream,int);

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream Constructor (Stream)

Creates a GzipInputStream with the default buffer size

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseInputStream As System.IO.Stream _
)
[C#]
public GZipInputStream(
   Stream baseInputStream
);

Parameters

baseInputStream

The stream to read compressed data from (baseInputStream GZIP format)

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace | GZipInputStream Constructor Overload List


GZipInputStream Constructor (Stream, Int32)

Creates a GZIPInputStream with the specified buffer size

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseInputStream As System.IO.Stream, _
   ByVal size As Integer _
)
[C#]
public GZipInputStream(
   Stream baseInputStream,
   int size
);

Parameters

baseInputStream

The stream to read compressed data from (baseInputStream GZIP format)

size

Size of the buffer to use

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace | GZipInputStream Constructor Overload List


GZipInputStream Fields

The fields of the GZipInputStream class are listed below. For a complete list of GZipInputStream class members, see the GZipInputStream Members topic.

Protected Instance Fields

baseInputStream |
buf |
crc | CRC-32 value for uncompressed data
eos | Indicates end of stream
inf |
len |

See Also

GZipInputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.baseInputStream Field

[Visual Basic]
Protected baseInputStream As System.IO.Stream
[C#]
protected Stream baseInputStream;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.crc Field

CRC-32 value for uncompressed data

[Visual Basic]
Protected crc As ICSharpCode.SharpZipLib.Checksums.Crc32
[C#]
protected Crc32 crc;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.eos Field

Indicates end of stream

[Visual Basic]
Protected eos As Boolean
[C#]
protected bool eos;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.inf Field

[Visual Basic]
Protected inf As ICSharpCode.SharpZipLib.Zip.Compression.Inflater
[C#]
protected Inflater inf;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.len Field

[Visual Basic]
Protected len As Integer
[C#]
protected int len;

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream Methods

The methods of the GZipInputStream class are listed below. For a complete list of GZipInputStream class members, see the GZipInputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close (inherited from InflaterInputStream) | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush (inherited from InflaterInputStream) | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Reads uncompressed data into an array of bytes
ReadByte (inherited from InflaterInputStream) | Reads one byte of decompressed data. The byte is baseInputStream the lower 8 bits of the int.
Seek (inherited from InflaterInputStream) | I needed to implement the abstract member.
SetLength (inherited from InflaterInputStream) | I needed to implement the abstract member.
Skip (inherited from InflaterInputStream) | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write (inherited from InflaterInputStream) | I needed to implement the abstract member.
WriteByte (inherited from InflaterInputStream) | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill (inherited from InflaterInputStream) | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

GZipInputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipInputStream.Read Method

Reads uncompressed data into an array of bytes

[Visual Basic]
Overrides Public Function Read( _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] buf,
   int offset,
   int len
);

Parameters

buf

the buffer to read uncompressed data into

offset

the offset indicating where the data should be placed

len

the number of uncompressed bytes to be read

See Also

GZipInputStream Class | GZipInputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream Class

This filter stream is used to compress a stream into a "GZIP" stream. The "GZIP" format is described in RFC 1952. author of the original java version : John Leuner

For a list of all members of this type, see GZipOutputStream Members.

System.Object
MarshalByRefObject
Stream
DeflaterOutputStream
GZipOutputStream

[Visual Basic]
Public Class GZipOutputStream
   Inherits DeflaterOutputStream
   Implements IDisposable
[C#]
public class GZipOutputStream : DeflaterOutputStream, IDisposable

Example

This sample shows how to gzip a file

            using System;
            using System.IO;

            using NZlib.GZip;

            class MainClass
            {
                public static void Main(string[] args)
                {
                    Stream s = new GZipOutputStream(File.Create(args[0] + ".gz"));
                    FileStream fs = File.OpenRead(args[0]);
                    byte[] writeData = new byte[fs.Length];
                    fs.Read(writeData, 0, (int)fs.Length);
                    s.Write(writeData, 0, writeData.Length);
                    s.Close();
                }
            }

Requirements

Namespace: ICSharpCode.SharpZipLib.GZip Namespace

Assembly: SharpZipLib.dll

See Also

GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream Members

Public Instance Constructors

GZipOutputStream Overloaded. Initialize a new instance of the GZipOutputStream class.

Public Instance Properties

CanRead (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
CanSeek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
CanWrite (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Length (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Position (inherited from DeflaterOutputStream) | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Writes remaining compressed output data to the output stream and closes it.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish |
Flush (inherited from DeflaterOutputStream) | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ReadByte (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Seek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetLength (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |
WriteByte (inherited from DeflaterOutputStream) | Writes a single byte to the compressed output stream.

Protected Instance Fields

baseOutputStream |
buf |
crc | CRC-32 value for uncompressed data
def |

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate (inherited from DeflaterOutputStream) Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

GZipOutputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream Constructor

An NDoc Documented Class Library

GZipOutputStream

Creates a GzipOutputStream with the default buffer size

Overload List

Creates a GzipOutputStream with the default buffer size

public GZipOutputStream(Stream);

Creates a GZIPOutputStream with the specified buffer size

public GZipOutputStream(Stream,int);

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream Constructor (Stream)

Creates a GzipOutputStream with the default buffer size

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream _
)
[C#]
public GZipOutputStream(
   Stream baseOutputStream
);

Parameters

baseOutputStream

The stream to read data (to be compressed) from

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace | GZipOutputStream Constructor Overload List


GZipOutputStream Constructor (Stream, Int32)

Creates a GZIPOutputStream with the specified buffer size

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream, _
   ByVal size As Integer _
)
[C#]
public GZipOutputStream(
   Stream baseOutputStream,
   int size
);

Parameters

baseOutputStream

The stream to read data (to be compressed) from

size

Size of the buffer to use

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace | GZipOutputStream Constructor Overload List


GZipOutputStream Fields

The fields of the GZipOutputStream class are listed below. For a complete list of GZipOutputStream class members, see the GZipOutputStream Members topic.

Protected Instance Fields

baseOutputStream |
buf |
crc | CRC-32 value for uncompressed data
def |

See Also

GZipOutputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.baseOutputStream Field

[Visual Basic]
Protected baseOutputStream As System.IO.Stream
[C#]
protected Stream baseOutputStream;

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.crc Field

CRC-32 value for uncompressed data

[Visual Basic]
Protected crc As ICSharpCode.SharpZipLib.Checksums.Crc32
[C#]
protected Crc32 crc;

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.def Field

[Visual Basic]
Protected def As ICSharpCode.SharpZipLib.Zip.Compression.Deflater
[C#]
protected Deflater def;

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream Methods

The methods of the GZipOutputStream class are listed below. For a complete list of GZipOutputStream class members, see the GZipOutputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Writes remaining compressed output data to the output stream and closes it.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish |
Flush (inherited from DeflaterOutputStream) | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ReadByte (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Seek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetLength (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |
WriteByte (inherited from DeflaterOutputStream) | Writes a single byte to the compressed output stream.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate (inherited from DeflaterOutputStream) Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

GZipOutputStream Class | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.Close Method

Writes remaining compressed output data to the output stream and closes it.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.Finish Method

[Visual Basic]
Overrides Public Sub Finish()
[C#]
public override void Finish();

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


GZipOutputStream.Write Method

[Visual Basic]
Overrides Public Sub Write( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public override void Write(
   byte[] buf,
   int off,
   int len
);

See Also

GZipOutputStream Class | GZipOutputStream Members | ICSharpCode.SharpZipLib.GZip Namespace


ICSharpCode.SharpZipLib.Tar

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Tar Namespace

Namespace hierarchy

Classes

Class | Description
InvalidHeaderException | This exception is used to indicate that there is a problem with a TAR archive header.
TarArchive | The TarArchive class implements the concept of a tar archive. A tar archive is a series of entries, each of which represents a file system object. Each entry in the archive consists of a header record. Directory entries consist only of the header record, and are followed by entries for the directory's contents. File entries consist of a header record followed by the number of records needed to contain the file's contents. All entries are written on record boundaries. Records are 512 bytes long. TarArchives are instantiated in either read or write mode, based upon whether they are instantiated with an InputStream or an OutputStream. Once instantiated TarArchives read/write mode can not be changed. There is currently no support for random access to tar archives. However, it seems that subclassing TarArchive, and using the TarBuffer.getCurrentRecordNum() and TarBuffer.getCurrentBlockNum() methods, this would be rather trvial.
TarBuffer The TarBuffer class implements the tar archive concept of a buffered input stream. This concept goes back to the days of blocked tape drives and special io devices. In the C# universe, the only real function that this class performs is to ensure that files have the correct "block" size, or other tars will complain.

You should never have a need to access this class directly. TarBuffers are created by Tar IO Streams.

TarEntry This class represents an entry in a Tar archive. It consists of the entry's header, as well as the entry's File. Entries can be instantiated in one of three ways, depending on how they are to be used.

TarEntries that are created from the header bytes read from an archive are instantiated with the TarEntry( byte[] ) constructor. These entries will be used when extracting from or listing the contents of an archive. These entries have their header filled in using the header bytes. They also set the File to null, since they reference an archive entry not a file.

TarEntries that are created from Files that are to be written into an archive are instantiated with the TarEntry( File ) constructor. These entries have their header filled in using the File's information. They also keep a reference to the File for convenience when writing entries.

Finally, TarEntries can be constructed from nothing but a name. This allows the programmer to construct the entry by hand, for instance when only an InputStream is available for writing to the archive, and the header information is constructed from other information. In this case the header fields are set to defaults and the File is set to null.

The C structure for a Tar Entry's header is:

            struct header {
                char	name[NAMSIZ];
                char	mode[8];
                char	uid[8];
                char	gid[8];
                char	size[12];
                char	mtime[12];
                char	chksum[8];
                char	linkflag;
                char	linkname[NAMSIZ];
                char	magic[8];
                char	uname[TUNMLEN];
                char	gname[TGNMLEN];
                char	devmajor[8];
                char	devminor[8];
                } header;

TarHeader
TarHeader | This class encapsulates the Tar Entry Header used in Tar Archives. The class also holds a number of tar constants, used mostly in headers.
TarInputStream | The TarInputStream reads a UNIX tar archive as an InputStream. methods are provided to position at each successive entry in the archive, and the read each entry as a normal input stream using read().
TarInputStream.EntryFactoryAdapter
TarOutputStream | The TarOutputStream writes a UNIX tar archive as an OutputStream. Methods are provided to put entries, and then write their contents by writing to this stream using write().

Interfaces

Interface | Description
TarInputStream.IEntryFactory | This interface is provided, with the method setEntryFactory(), to allow the programmer to have their own TarEntry subclass instantiated for the entries return from getNextEntry().

Delegates

Delegate | Description
ProgressMessageHandler |


InvalidHeaderException Class

This exception is used to indicate that there is a problem with a TAR archive header.

For a list of all members of this type, see InvalidHeaderException Members.

System.Object
Exception
SystemException
IOException
InvalidHeaderException

[Visual Basic]
Public Class InvalidHeaderException
   Inherits IOException
   Implements ISerializable
[C#]
public class InvalidHeaderException : IOException, ISerializable

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

InvalidHeaderException Members | ICSharpCode.SharpZipLib.Tar Namespace


InvalidHeaderException Members

Public Instance Constructors

InvalidHeaderException Overloaded. Initialize a new instance of the InvalidHeaderException class.

Public Instance Properties

HelpLink (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
InnerException (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
Message (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
Source (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
StackTrace (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.
TargetSite (inherited from System.Exception) | Select the method name to go to the Microsoft documentation.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBaseException (inherited from Exception) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetObjectData (inherited from Exception) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Exception) | Select the method name to go to the Microsoft documentation.

Protected Instance Properties

HResult (inherited from System.Exception) Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

InvalidHeaderException Class | ICSharpCode.SharpZipLib.Tar Namespace


InvalidHeaderException Constructor

An NDoc Documented Class Library

InvalidHeaderException

Overload List

public InvalidHeaderException();

public InvalidHeaderException(string);

See Also

InvalidHeaderException Class | InvalidHeaderException Members | ICSharpCode.SharpZipLib.Tar Namespace


InvalidHeaderException Constructor ()

[Visual Basic]
Overloads Public Sub New()
[C#]
public InvalidHeaderException();

See Also

InvalidHeaderException Class | InvalidHeaderException Members | ICSharpCode.SharpZipLib.Tar Namespace | InvalidHeaderException Constructor Overload List


InvalidHeaderException Constructor (String)

[Visual Basic]
Overloads Public Sub New( _
   ByVal msg As String _
)
[C#]
public InvalidHeaderException(
   string msg
);

See Also

InvalidHeaderException Class | InvalidHeaderException Members | ICSharpCode.SharpZipLib.Tar Namespace | InvalidHeaderException Constructor Overload List


ProgressMessageHandler Delegate

[Visual Basic]
Public Delegate Sub ProgressMessageHandler( _
   ByVal archive As ICSharpCode.SharpZipLib.Tar.TarArchive, _
   ByVal message As String _
)
[C#]
public delegate void ProgressMessageHandler(
   TarArchive archive,
   string message
);

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Class

The TarArchive class implements the concept of a tar archive. A tar archive is a series of entries, each of which represents a file system object. Each entry in the archive consists of a header record. Directory entries consist only of the header record, and are followed by entries for the directory's contents. File entries consist of a header record followed by the number of records needed to contain the file's contents. All entries are written on record boundaries. Records are 512 bytes long. TarArchives are instantiated in either read or write mode, based upon whether they are instantiated with an InputStream or an OutputStream. Once instantiated TarArchives read/write mode can not be changed. There is currently no support for random access to tar archives. However, it seems that subclassing TarArchive, and using the TarBuffer.getCurrentRecordNum() and TarBuffer.getCurrentBlockNum() methods, this would be rather trvial.

For a list of all members of this type, see TarArchive Members.

System.Object
TarArchive

[Visual Basic]
Public Class TarArchive
[C#]
public class TarArchive

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Members

Public Static (Shared) Methods

CreateInputTarArchive | Overloaded. The InputStream based constructors create a TarArchive for the purposes of e'x'tracting or lis't'ing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.
CreateOutputTarArchive | Overloaded. The OutputStream based constructors create a TarArchive for the purposes of 'c'reating a tar archive. Thus, use these constructors when you wish to create a new tar archive and write files into it.

Public Instance Properties

GroupId | Get the group id being used for archive entry headers.
GroupName | Get the group name being used for archive entry headers.
IsVerbose | Get/Set the verbosity setting.
RecordSize | Get the archive's record size. Because of its history, tar supports the concept of buffered IO consisting of BLOCKS of RECORDS. This allowed tar to match the IO characteristics of the physical device being used. Of course, in the Java world, this makes no sense, WITH ONE EXCEPTION - archives are expected to be propertly "blocked". Thus, all of the horrible TarBuffer support boils down to simply getting the "boundaries" correct.
UserId | Get the user id being used for archive entry headers.
UserName | Get the user name being used for archive entry headers.

Public Instance Methods

CloseArchive | Close the archive. This simply calls the underlying tar stream's close() method.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
ExtractContents | Perform the "extract" command and extract the contents of the archive.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ListContents | Perform the "list" command and list the contents of the archive. NOTE That this method uses the progress display to actually list the conents. If the progress display is not set, nothing will be listed!
SetAsciiTranslation | Set the ascii file translation flag. If ascii file translatio is true, then the MIME file type will be consulted to determine if the file is of type 'text/*'. If the MIME type is not found, then the TransFileTyper is consulted if it is not null. If either of these two checks indicates the file is an ascii text file, it will be translated. The translation converts the local operating system's concept of line ends into the UNIX line end, '\n', which is the defacto standard for a TAR archive. This makes text files compatible with UNIX, and since most tar implementations text files compatible with UNIX, and since most tar implementations
SetDebug |
SetKeepOldFiles | Set the flag that determines whether existing files are kept, or overwritten during extraction.
SetUserInfo | Set user and group information that will be used to fill in the tar archive's entry headers. Since Java currently provides no means of determining a user name, user id, group name, or group id for a given File, TarArchive allows the programmer to specify values to be used in their place.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteEntry | Write an entry to the archive. This method will call the putNextEntry and then write the contents of the entry, and finally call closeEntry()() for entries that are files. For directories, it will call putNextEntry(), and then, if the recurse flag is true, process each entry that is a child of the directory.

Public Instance Events

ProgressMessageEvent

Protected Instance Constructors

TarArchive Constructor

Protected Instance Fields

asciiTranslate
debug
groupId
groupName
keepOldFiles
pathPrefix
recordBuf
recordSize
rootPath
tarIn
tarOut
userId
userName
verbose

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.
OnProgressMessageEvent |

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Constructor

[Visual Basic]
Protected Sub New()
[C#]
protected TarArchive();

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Fields

The fields of the TarArchive class are listed below. For a complete list of TarArchive class members, see the TarArchive Members topic.

Protected Instance Fields

asciiTranslate
debug
groupId
groupName
keepOldFiles
pathPrefix
recordBuf
recordSize
rootPath
tarIn
tarOut
userId
userName
verbose

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.asciiTranslate Field

[Visual Basic]
Protected asciiTranslate As Boolean
[C#]
protected bool asciiTranslate;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.debug Field

[Visual Basic]
Protected debug As Boolean
[C#]
protected bool debug;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.GroupId Property

Get the group id being used for archive entry headers.

[Visual Basic]
Public ReadOnly Property GroupId As Integer
[C#]
public int GroupId {get;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.GroupName Property

Get the group name being used for archive entry headers.

[Visual Basic]
Public ReadOnly Property GroupName As String
[C#]
public string GroupName {get;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.keepOldFiles Field

[Visual Basic]
Protected keepOldFiles As Boolean
[C#]
protected bool keepOldFiles;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.pathPrefix Field

[Visual Basic]
Protected pathPrefix As String
[C#]
protected string pathPrefix;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.recordBuf Field

[Visual Basic]
Protected recordBuf As Byte()
[C#]
protected byte[] recordBuf;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.RecordSize Property

Get the archive's record size. Because of its history, tar supports the concept of buffered IO consisting of BLOCKS of RECORDS. This allowed tar to match the IO characteristics of the physical device being used. Of course, in the Java world, this makes no sense, WITH ONE EXCEPTION - archives are expected to be propertly "blocked". Thus, all of the horrible TarBuffer support boils down to simply getting the "boundaries" correct.

[Visual Basic]
Public ReadOnly Property RecordSize As Integer
[C#]
public int RecordSize {get;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.rootPath Field

[Visual Basic]
Protected rootPath As String
[C#]
protected string rootPath;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.tarIn Field

[Visual Basic]
Protected tarIn As ICSharpCode.SharpZipLib.Tar.TarInputStream
[C#]
protected TarInputStream tarIn;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.tarOut Field

[Visual Basic]
Protected tarOut As ICSharpCode.SharpZipLib.Tar.TarOutputStream
[C#]
protected TarOutputStream tarOut;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.UserId Property

Get the user id being used for archive entry headers.

[Visual Basic]
Public ReadOnly Property UserId As Integer
[C#]
public int UserId {get;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.UserName Property

Get the user name being used for archive entry headers.

[Visual Basic]
Public ReadOnly Property UserName As String
[C#]
public string UserName {get;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.verbose Field

[Visual Basic]
Protected verbose As Boolean
[C#]
protected bool verbose;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Properties

The properties of the TarArchive class are listed below. For a complete list of TarArchive class members, see the TarArchive Members topic.

Public Instance Properties

GroupId | Get the group id being used for archive entry headers.
GroupName | Get the group name being used for archive entry headers.
IsVerbose | Get/Set the verbosity setting.
RecordSize | Get the archive's record size. Because of its history, tar supports the concept of buffered IO consisting of BLOCKS of RECORDS. This allowed tar to match the IO characteristics of the physical device being used. Of course, in the Java world, this makes no sense, WITH ONE EXCEPTION - archives are expected to be propertly "blocked". Thus, all of the horrible TarBuffer support boils down to simply getting the "boundaries" correct.
UserId | Get the user id being used for archive entry headers.
UserName | Get the user name being used for archive entry headers.

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.IsVerbose Property

Get/Set the verbosity setting.

[Visual Basic]
Public Property IsVerbose As Boolean
[C#]
public bool IsVerbose {get; set;}

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Methods

The methods of the TarArchive class are listed below. For a complete list of TarArchive class members, see the TarArchive Members topic.

Public Static (Shared) Methods

CreateInputTarArchive | Overloaded. The InputStream based constructors create a TarArchive for the purposes of e'x'tracting or lis't'ing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.
CreateOutputTarArchive | Overloaded. The OutputStream based constructors create a TarArchive for the purposes of 'c'reating a tar archive. Thus, use these constructors when you wish to create a new tar archive and write files into it.

Public Instance Methods

CloseArchive | Close the archive. This simply calls the underlying tar stream's close() method.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
ExtractContents | Perform the "extract" command and extract the contents of the archive.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ListContents | Perform the "list" command and list the contents of the archive. NOTE That this method uses the progress display to actually list the conents. If the progress display is not set, nothing will be listed!
SetAsciiTranslation | Set the ascii file translation flag. If ascii file translatio is true, then the MIME file type will be consulted to determine if the file is of type 'text/*'. If the MIME type is not found, then the TransFileTyper is consulted if it is not null. If either of these two checks indicates the file is an ascii text file, it will be translated. The translation converts the local operating system's concept of line ends into the UNIX line end, '\n', which is the defacto standard for a TAR archive. This makes text files compatible with UNIX, and since most tar implementations text files compatible with UNIX, and since most tar implementations
SetDebug |
SetKeepOldFiles | Set the flag that determines whether existing files are kept, or overwritten during extraction.
SetUserInfo | Set user and group information that will be used to fill in the tar archive's entry headers. Since Java currently provides no means of determining a user name, user id, group name, or group id for a given File, TarArchive allows the programmer to specify values to be used in their place.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteEntry | Write an entry to the archive. This method will call the putNextEntry and then write the contents of the entry, and finally call closeEntry()() for entries that are files. For directories, it will call putNextEntry(), and then, if the recurse flag is true, process each entry that is a child of the directory.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.
OnProgressMessageEvent |

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.CloseArchive Method

Close the archive. This simply calls the underlying tar stream's close() method.

[Visual Basic]
Public Sub CloseArchive()
[C#]
public void CloseArchive();

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


CreateInputTarArchive Method

An NDoc Documented Class Library

TarArchive.CreateInputTarArchive

The InputStream based constructors create a TarArchive for the purposes of e'x'tracting or lis't'ing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.

Overload List

The InputStream based constructors create a TarArchive for the purposes of e'x'tracting or lis't'ing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.

public static TarArchive CreateInputTarArchive(Stream);

public static TarArchive CreateInputTarArchive(Stream,int);

public static TarArchive CreateInputTarArchive(Stream,int,int);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.CreateInputTarArchive Method (Stream)

The InputStream based constructors create a TarArchive for the purposes of e'x'tracting or lis't'ing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.

[Visual Basic]
Overloads Public Shared Function CreateInputTarArchive( _
   ByVal inputStream As System.IO.Stream _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateInputTarArchive(
   Stream inputStream
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateInputTarArchive Overload List


TarArchive.CreateInputTarArchive Method (Stream, Int32)

[Visual Basic]
Overloads Public Shared Function CreateInputTarArchive( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateInputTarArchive(
   Stream inputStream,
   int blockSize
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateInputTarArchive Overload List


TarArchive.CreateInputTarArchive Method (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Shared Function CreateInputTarArchive( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateInputTarArchive(
   Stream inputStream,
   int blockSize,
   int recordSize
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateInputTarArchive Overload List


CreateOutputTarArchive Method

An NDoc Documented Class Library

TarArchive.CreateOutputTarArchive

The OutputStream based constructors create a TarArchive for the purposes of 'c'reating a tar archive. Thus, use these constructors when you wish to create a new tar archive and write files into it.

Overload List

The OutputStream based constructors create a TarArchive for the purposes of 'c'reating a tar archive. Thus, use these constructors when you wish to create a new tar archive and write files into it.

public static TarArchive CreateOutputTarArchive(Stream);

public static TarArchive CreateOutputTarArchive(Stream,int);

public static TarArchive CreateOutputTarArchive(Stream,int,int);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.CreateOutputTarArchive Method (Stream)

The OutputStream based constructors create a TarArchive for the purposes of 'c'reating a tar archive. Thus, use these constructors when you wish to create a new tar archive and write files into it.

[Visual Basic]
Overloads Public Shared Function CreateOutputTarArchive( _
   ByVal outputStream As System.IO.Stream _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateOutputTarArchive(
   Stream outputStream
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateOutputTarArchive Overload List


TarArchive.CreateOutputTarArchive Method (Stream, Int32)

[Visual Basic]
Overloads Public Shared Function CreateOutputTarArchive( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateOutputTarArchive(
   Stream outputStream,
   int blockSize
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateOutputTarArchive Overload List


TarArchive.CreateOutputTarArchive Method (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Shared Function CreateOutputTarArchive( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarArchive
[C#]
public static TarArchive CreateOutputTarArchive(
   Stream outputStream,
   int blockSize,
   int recordSize
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace | TarArchive.CreateOutputTarArchive Overload List


TarArchive.ExtractContents Method

Perform the "extract" command and extract the contents of the archive.

[Visual Basic]
Public Sub ExtractContents( _
   ByVal destDir As String _
)
[C#]
public void ExtractContents(
   string destDir
);

Parameters

destDir

The destination directory into which to extract.

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.ListContents Method

Perform the "list" command and list the contents of the archive. NOTE That this method uses the progress display to actually list the conents. If the progress display is not set, nothing will be listed!

[Visual Basic]
Public Sub ListContents()
[C#]
public void ListContents();

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.OnProgressMessageEvent Method

[Visual Basic]
Overridable Protected Sub OnProgressMessageEvent( _
   ByVal message As String _
)
[C#]
protected virtual void OnProgressMessageEvent(
   string message
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.SetAsciiTranslation Method

Set the ascii file translation flag. If ascii file translatio is true, then the MIME file type will be consulted to determine if the file is of type 'text/*'. If the MIME type is not found, then the TransFileTyper is consulted if it is not null. If either of these two checks indicates the file is an ascii text file, it will be translated. The translation converts the local operating system's concept of line ends into the UNIX line end, '\n', which is the defacto standard for a TAR archive. This makes text files compatible with UNIX, and since most tar implementations text files compatible with UNIX, and since most tar implementations

[Visual Basic]
Public Sub SetAsciiTranslation( _
   ByVal asciiTranslate As Boolean _
)
[C#]
public void SetAsciiTranslation(
   bool asciiTranslate
);

Parameters

asciiTranslate

If true, translate ascii text files.

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.SetDebug Method

[Visual Basic]
Public Sub SetDebug( _
   ByVal debugF As Boolean _
)
[C#]
public void SetDebug(
   bool debugF
);

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.SetKeepOldFiles Method

Set the flag that determines whether existing files are kept, or overwritten during extraction.

[Visual Basic]
Public Sub SetKeepOldFiles( _
   ByVal keepOldFiles As Boolean _
)
[C#]
public void SetKeepOldFiles(
   bool keepOldFiles
);

Parameters

keepOldFiles

If true, do not overwrite existing files.

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.SetUserInfo Method

Set user and group information that will be used to fill in the tar archive's entry headers. Since Java currently provides no means of determining a user name, user id, group name, or group id for a given File, TarArchive allows the programmer to specify values to be used in their place.

[Visual Basic]
Public Sub SetUserInfo( _
   ByVal userId As Integer, _
   ByVal userName As String, _
   ByVal groupId As Integer, _
   ByVal groupName As String _
)
[C#]
public void SetUserInfo(
   int userId,
   string userName,
   int groupId,
   string groupName
);

Parameters

userId

The user Id to use in the headers.

userName

The user name to use in the headers.

groupId

The group id to use in the headers.

groupName

The group name to use in the headers.

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.WriteEntry Method

Write an entry to the archive. This method will call the putNextEntry and then write the contents of the entry, and finally call closeEntry()() for entries that are files. For directories, it will call putNextEntry(), and then, if the recurse flag is true, process each entry that is a child of the directory.

[Visual Basic]
Public Sub WriteEntry( _
   ByVal entry As ICSharpCode.SharpZipLib.Tar.TarEntry, _
   ByVal recurse As Boolean _
)
[C#]
public void WriteEntry(
   TarEntry entry,
   bool recurse
);

Parameters

entry

The TarEntry representing the entry to write to the archive.

recurse

If true, process the children of directory entries.

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive Events

The events of the TarArchive class are listed below. For a complete list of TarArchive class members, see the TarArchive Members topic.

Public Instance Events

ProgressMessageEvent

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace


TarArchive.ProgressMessageEvent Event

[Visual Basic]
Public ProgressMessageEvent As ICSharpCode.SharpZipLib.Tar.ProgressMessageHandler
[C#]
public ProgressMessageHandler ProgressMessageEvent;

See Also

TarArchive Class | TarArchive Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer Class

The TarBuffer class implements the tar archive concept of a buffered input stream. This concept goes back to the days of blocked tape drives and special io devices. In the C# universe, the only real function that this class performs is to ensure that files have the correct "block" size, or other tars will complain.

You should never have a need to access this class directly. TarBuffers are created by Tar IO Streams.

For a list of all members of this type, see TarBuffer Members.

System.Object
TarBuffer

[Visual Basic]
Public Class TarBuffer
[C#]
public class TarBuffer

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer Members

Public Static (Shared) Fields

DEFAULT_BLKSIZE
DEFAULT_RCDSIZE

Public Static (Shared) Methods

CreateInputTarBuffer | Overloaded.
CreateOutputTarBuffer | Overloaded.

Public Instance Methods

Close | Close the TarBuffer. If this is an output buffer, also flush the current block before closing.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBlockSize | Get the TAR Buffer's block size. Blocks consist of multiple records.
GetCurrentBlockNum | Get the current block number, zero based.
GetCurrentRecordNum | Get the current record number, within the current block, zero based. Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetRecordSize | Get the TAR Buffer's record size.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsEOFRecord | Determine if an archive record indicate End of Archive. End of archive is indicated by a record that consists entirely of null bytes.
ReadRecord | Read a record from the input stream and return the data.
SetDebug | Set the debugging flag for the buffer.
SkipRecord | Skip over a record on the input stream.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteRecord | Overloaded. Write an archive record to the archive.

Protected Instance Constructors

TarBuffer Constructor

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarBuffer Class | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer Constructor

[Visual Basic]
Protected Sub New()
[C#]
protected TarBuffer();

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer Fields

The fields of the TarBuffer class are listed below. For a complete list of TarBuffer class members, see the TarBuffer Members topic.

Public Static (Shared) Fields

DEFAULT_BLKSIZE
DEFAULT_RCDSIZE

See Also

TarBuffer Class | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.DEFAULT_BLKSIZE Field

[Visual Basic]
Public Shared ReadOnly DEFAULT_BLKSIZE As Integer
[C#]
public static readonly int DEFAULT_BLKSIZE;

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.DEFAULT_RCDSIZE Field

[Visual Basic]
Public Shared ReadOnly DEFAULT_RCDSIZE As Integer
[C#]
public static readonly int DEFAULT_RCDSIZE;

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer Methods

The methods of the TarBuffer class are listed below. For a complete list of TarBuffer class members, see the TarBuffer Members topic.

Public Static (Shared) Methods

CreateInputTarBuffer | Overloaded.
CreateOutputTarBuffer | Overloaded.

Public Instance Methods

Close | Close the TarBuffer. If this is an output buffer, also flush the current block before closing.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBlockSize | Get the TAR Buffer's block size. Blocks consist of multiple records.
GetCurrentBlockNum | Get the current block number, zero based.
GetCurrentRecordNum | Get the current record number, within the current block, zero based. Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetRecordSize | Get the TAR Buffer's record size.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsEOFRecord | Determine if an archive record indicate End of Archive. End of archive is indicated by a record that consists entirely of null bytes.
ReadRecord | Read a record from the input stream and return the data.
SetDebug | Set the debugging flag for the buffer.
SkipRecord | Skip over a record on the input stream.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteRecord | Overloaded. Write an archive record to the archive.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarBuffer Class | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.Close Method

Close the TarBuffer. If this is an output buffer, also flush the current block before closing.

[Visual Basic]
Public Sub Close()
[C#]
public void Close();

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


CreateInputTarBuffer Method

An NDoc Documented Class Library

TarBuffer.CreateInputTarBuffer

Overload List

public static TarBuffer CreateInputTarBuffer(Stream);

public static TarBuffer CreateInputTarBuffer(Stream,int);

public static TarBuffer CreateInputTarBuffer(Stream,int,int);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.CreateInputTarBuffer Method (Stream)

[Visual Basic]
Overloads Public Shared Function CreateInputTarBuffer( _
   ByVal inputStream As System.IO.Stream _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateInputTarBuffer(
   Stream inputStream
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateInputTarBuffer Overload List


TarBuffer.CreateInputTarBuffer Method (Stream, Int32)

[Visual Basic]
Overloads Public Shared Function CreateInputTarBuffer( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateInputTarBuffer(
   Stream inputStream,
   int blockSize
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateInputTarBuffer Overload List


TarBuffer.CreateInputTarBuffer Method (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Shared Function CreateInputTarBuffer( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateInputTarBuffer(
   Stream inputStream,
   int blockSize,
   int recordSize
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateInputTarBuffer Overload List


CreateOutputTarBuffer Method

An NDoc Documented Class Library

TarBuffer.CreateOutputTarBuffer

Overload List

public static TarBuffer CreateOutputTarBuffer(Stream);

public static TarBuffer CreateOutputTarBuffer(Stream,int);

public static TarBuffer CreateOutputTarBuffer(Stream,int,int);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.CreateOutputTarBuffer Method (Stream)

[Visual Basic]
Overloads Public Shared Function CreateOutputTarBuffer( _
   ByVal outputStream As System.IO.Stream _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateOutputTarBuffer(
   Stream outputStream
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateOutputTarBuffer Overload List


TarBuffer.CreateOutputTarBuffer Method (Stream, Int32)

[Visual Basic]
Overloads Public Shared Function CreateOutputTarBuffer( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateOutputTarBuffer(
   Stream outputStream,
   int blockSize
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateOutputTarBuffer Overload List


TarBuffer.CreateOutputTarBuffer Method (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Shared Function CreateOutputTarBuffer( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
) As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
public static TarBuffer CreateOutputTarBuffer(
   Stream outputStream,
   int blockSize,
   int recordSize
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.CreateOutputTarBuffer Overload List


TarBuffer.GetBlockSize Method

Get the TAR Buffer's block size. Blocks consist of multiple records.

[Visual Basic]
Public Function GetBlockSize() As Integer
[C#]
public int GetBlockSize();

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.GetCurrentBlockNum Method

Get the current block number, zero based.

[Visual Basic]
Public Function GetCurrentBlockNum() As Integer
[C#]
public int GetCurrentBlockNum();

Return Value

The current zero based block number.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.GetCurrentRecordNum Method

Get the current record number, within the current block, zero based. Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.

[Visual Basic]
Public Function GetCurrentRecordNum() As Integer
[C#]
public int GetCurrentRecordNum();

Return Value

The current zero based record number.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.GetRecordSize Method

Get the TAR Buffer's record size.

[Visual Basic]
Public Function GetRecordSize() As Integer
[C#]
public int GetRecordSize();

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.IsEOFRecord Method

Determine if an archive record indicate End of Archive. End of archive is indicated by a record that consists entirely of null bytes.

[Visual Basic]
Public Function IsEOFRecord( _
   ByVal record As Byte() _
) As Boolean
[C#]
public bool IsEOFRecord(
   byte[] record
);

Parameters

record

The record data to check.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.ReadRecord Method

Read a record from the input stream and return the data.

[Visual Basic]
Public Function ReadRecord() As Byte()
[C#]
public byte[] ReadRecord();

Return Value

The record data.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.SetDebug Method

Set the debugging flag for the buffer.

[Visual Basic]
Public Sub SetDebug( _
   ByVal debug As Boolean _
)
[C#]
public void SetDebug(
   bool debug
);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.SkipRecord Method

Skip over a record on the input stream.

[Visual Basic]
Public Sub SkipRecord()
[C#]
public void SkipRecord();

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


WriteRecord Method

An NDoc Documented Class Library

TarBuffer.WriteRecord

Write an archive record to the archive.

Overload List

Write an archive record to the archive.

public void WriteRecord(byte[]);

Write an archive record to the archive, where the record may be inside of a larger array buffer. The buffer must be "offset plus record size" long.

public void WriteRecord(byte[],int);

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace


TarBuffer.WriteRecord Method (Byte[])

Write an archive record to the archive.

[Visual Basic]
Overloads Public Sub WriteRecord( _
   ByVal record As Byte() _
)
[C#]
public void WriteRecord(
   byte[] record
);

Parameters

record

The record data to write to the archive.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.WriteRecord Overload List


TarBuffer.WriteRecord Method (Byte[], Int32)

Write an archive record to the archive, where the record may be inside of a larger array buffer. The buffer must be "offset plus record size" long.

[Visual Basic]
Overloads Public Sub WriteRecord( _
   ByVal buf As Byte(), _
   ByVal offset As Integer _
)
[C#]
public void WriteRecord(
   byte[] buf,
   int offset
);

Parameters

buf

The buffer containing the record data to write.

offset

The offset of the record data within buf.

See Also

TarBuffer Class | TarBuffer Members | ICSharpCode.SharpZipLib.Tar Namespace | TarBuffer.WriteRecord Overload List


TarEntry Class

This class represents an entry in a Tar archive. It consists of the entry's header, as well as the entry's File. Entries can be instantiated in one of three ways, depending on how they are to be used.

TarEntries that are created from the header bytes read from an archive are instantiated with the TarEntry( byte[] ) constructor. These entries will be used when extracting from or listing the contents of an archive. These entries have their header filled in using the header bytes. They also set the File to null, since they reference an archive entry not a file.

TarEntries that are created from Files that are to be written into an archive are instantiated with the TarEntry( File ) constructor. These entries have their header filled in using the File's information. They also keep a reference to the File for convenience when writing entries.

Finally, TarEntries can be constructed from nothing but a name. This allows the programmer to construct the entry by hand, for instance when only an InputStream is available for writing to the archive, and the header information is constructed from other information. In this case the header fields are set to defaults and the File is set to null.

The C structure for a Tar Entry's header is:

            struct header {
                char	name[NAMSIZ];
                char	mode[8];
                char	uid[8];
                char	gid[8];
                char	size[12];
                char	mtime[12];
                char	chksum[8];
                char	linkflag;
                char	linkname[NAMSIZ];
                char	magic[8];
                char	uname[TUNMLEN];
                char	gname[TGNMLEN];
                char	devmajor[8];
                char	devminor[8];
                } header;

TarHeader

For a list of all members of this type, see TarEntry Members.

System.Object
TarEntry

[Visual Basic]
Public Class TarEntry
[C#]
public class TarEntry

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry Members

Public Static (Shared) Methods

CreateEntryFromFile | Construct an entry for a file. File is set to file, and the header is constructed from information from the file.
CreateTarEntry | Construct an entry with only a name. This allows the programmer to construct the entry's header "by hand". File is set to null.

Public Instance Constructors

TarEntry Constructor Construct an entry from an archive's header bytes. File is set to null.

Public Instance Properties

File | Get this entry's file.
GroupId | Get/set this entry's group id.
GroupName | Get/set this entry's group name.
IsDirectory | Return whether or not this entry represents a directory.
ModTime |
Name | Get/Set this entry's name.
Size | Get/set this entry's file size.
TarHeader | Get this entry's header.
UserId | Get/set this entry's user id.
UserName | Get/set this entry's user name.

Public Instance Methods

AdjustEntryName | Convenience method that will modify an entry's name directly in place in an entry header buffer byte array.
ComputeCheckSum | Compute the checksum of a tar entry header.
Equals | Determine if the two entries are equal. Equality is determined by the header names being equal.
GetDirectoryEntries | If this entry represents a file, and the file is a directory, return an array of TarEntries for this entry's children.
GetFileTarHeader | Fill in a TarHeader with information from a File.
GetHashCode | Must be overridden when you override Equals.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsDescendent | Determine if the given entry is a descendant of this entry. Descendancy is determined by the name of the descendant starting with this entry's name.
NameTarHeader | Fill in a TarHeader given only the entry's name.
ParseTarHeader | Parse an entry's TarHeader information from a header buffer.
SetIds | Convenience method to set this entry's group and user ids.
SetNames | Convenience method to set this entry's group and user names.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteEntryHeader | Write an entry's header information to a header buffer.

Protected Instance Fields

file | If this entry represents a File, this references it.
header | This is the entry's header information.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarEntry Class | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry Constructor

Construct an entry from an archive's header bytes. File is set to null.

[Visual Basic]
Overloads Public Sub New( _
   ByVal headerBuf As Byte() _
)
[C#]
public TarEntry(
   byte[] headerBuf
);

Parameters

headerBuf

The header bytes from a tar archive entry.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry Fields

The fields of the TarEntry class are listed below. For a complete list of TarEntry class members, see the TarEntry Members topic.

Protected Instance Fields

file | If this entry represents a File, this references it.
header | This is the entry's header information.

See Also

TarEntry Class | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.File Property

Get this entry's file.

[Visual Basic]
Public ReadOnly Property File As String
[C#]
public string File {get;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.header Field

This is the entry's header information.

[Visual Basic]
Protected header As ICSharpCode.SharpZipLib.Tar.TarHeader
[C#]
protected TarHeader header;

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry Properties

The properties of the TarEntry class are listed below. For a complete list of TarEntry class members, see the TarEntry Members topic.

Public Instance Properties

File | Get this entry's file.
GroupId | Get/set this entry's group id.
GroupName | Get/set this entry's group name.
IsDirectory | Return whether or not this entry represents a directory.
ModTime |
Name | Get/Set this entry's name.
Size | Get/set this entry's file size.
TarHeader | Get this entry's header.
UserId | Get/set this entry's user id.
UserName | Get/set this entry's user name.

See Also

TarEntry Class | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.GroupId Property

Get/set this entry's group id.

[Visual Basic]
Public Property GroupId As Integer
[C#]
public int GroupId {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.GroupName Property

Get/set this entry's group name.

[Visual Basic]
Public Property GroupName As String
[C#]
public string GroupName {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.IsDirectory Property

Return whether or not this entry represents a directory.

[Visual Basic]
Public ReadOnly Property IsDirectory As Boolean
[C#]
public bool IsDirectory {get;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.ModTime Property

[Visual Basic]
Public Property ModTime As Date
[C#]
public System.DateTime ModTime {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.Name Property

Get/Set this entry's name.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.Size Property

Get/set this entry's file size.

[Visual Basic]
Public Property Size As Long
[C#]
public long Size {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.TarHeader Property

Get this entry's header.

[Visual Basic]
Public ReadOnly Property TarHeader As ICSharpCode.SharpZipLib.Tar.TarHeader
[C#]
public TarHeader TarHeader {get;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.UserId Property

Get/set this entry's user id.

[Visual Basic]
Public Property UserId As Integer
[C#]
public int UserId {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.UserName Property

Get/set this entry's user name.

[Visual Basic]
Public Property UserName As String
[C#]
public string UserName {get; set;}

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry Methods

The methods of the TarEntry class are listed below. For a complete list of TarEntry class members, see the TarEntry Members topic.

Public Static (Shared) Methods

CreateEntryFromFile | Construct an entry for a file. File is set to file, and the header is constructed from information from the file.
CreateTarEntry | Construct an entry with only a name. This allows the programmer to construct the entry's header "by hand". File is set to null.

Public Instance Methods

AdjustEntryName | Convenience method that will modify an entry's name directly in place in an entry header buffer byte array.
ComputeCheckSum | Compute the checksum of a tar entry header.
Equals | Determine if the two entries are equal. Equality is determined by the header names being equal.
GetDirectoryEntries | If this entry represents a file, and the file is a directory, return an array of TarEntries for this entry's children.
GetFileTarHeader | Fill in a TarHeader with information from a File.
GetHashCode | Must be overridden when you override Equals.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsDescendent | Determine if the given entry is a descendant of this entry. Descendancy is determined by the name of the descendant starting with this entry's name.
NameTarHeader | Fill in a TarHeader given only the entry's name.
ParseTarHeader | Parse an entry's TarHeader information from a header buffer.
SetIds | Convenience method to set this entry's group and user ids.
SetNames | Convenience method to set this entry's group and user names.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteEntryHeader | Write an entry's header information to a header buffer.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarEntry Class | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.AdjustEntryName Method

Convenience method that will modify an entry's name directly in place in an entry header buffer byte array.

[Visual Basic]
Public Sub AdjustEntryName( _
   ByVal outbuf As Byte(), _
   ByVal newName As String _
)
[C#]
public void AdjustEntryName(
   byte[] outbuf,
   string newName
);

Parameters

outbuf

The buffer containing the entry header to modify.

newName

The new name to place into the header buffer.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.ComputeCheckSum Method

Compute the checksum of a tar entry header.

[Visual Basic]
Public Function ComputeCheckSum( _
   ByVal buf As Byte() _
) As Long
[C#]
public long ComputeCheckSum(
   byte[] buf
);

Parameters

buf

The tar entry's header buffer.

Return Value

The computed checksum.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.CreateEntryFromFile Method

Construct an entry for a file. File is set to file, and the header is constructed from information from the file.

[Visual Basic]
Public Shared Function CreateEntryFromFile( _
   ByVal fileName As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public static TarEntry CreateEntryFromFile(
   string fileName
);

Parameters

fileName

The file that the entry represents.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.CreateTarEntry Method

Construct an entry with only a name. This allows the programmer to construct the entry's header "by hand". File is set to null.

[Visual Basic]
Public Shared Function CreateTarEntry( _
   ByVal name As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public static TarEntry CreateTarEntry(
   string name
);

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.Equals Method

Determine if the two entries are equal. Equality is determined by the header names being equal.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal it As Object _
) As Boolean
[C#]
public override bool Equals(
   object it
);

Return Value

True if the entries are equal.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.GetDirectoryEntries Method

If this entry represents a file, and the file is a directory, return an array of TarEntries for this entry's children.

[Visual Basic]
Public Function GetDirectoryEntries() As ICSharpCode.SharpZipLib.Tar.TarEntry()
[C#]
public TarEntry[] GetDirectoryEntries();

Return Value

An array of TarEntry's for this entry's children.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.GetFileTarHeader Method

Fill in a TarHeader with information from a File.

[Visual Basic]
Public Sub GetFileTarHeader( _
   ByVal hdr As ICSharpCode.SharpZipLib.Tar.TarHeader, _
   ByVal file As String _
)
[C#]
public void GetFileTarHeader(
   TarHeader hdr,
   string file
);

Parameters

hdr

The TarHeader to fill in.

file

The file from which to get the header information.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.GetHashCode Method

Must be overridden when you override Equals.

[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.IsDescendent Method

Determine if the given entry is a descendant of this entry. Descendancy is determined by the name of the descendant starting with this entry's name.

[Visual Basic]
Public Function IsDescendent( _
   ByVal desc As ICSharpCode.SharpZipLib.Tar.TarEntry _
) As Boolean
[C#]
public bool IsDescendent(
   TarEntry desc
);

Parameters

desc

Entry to be checked as a descendent of this.

Return Value

True if entry is a descendant of this.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.NameTarHeader Method

Fill in a TarHeader given only the entry's name.

[Visual Basic]
Public Sub NameTarHeader( _
   ByVal hdr As ICSharpCode.SharpZipLib.Tar.TarHeader, _
   ByVal name As String _
)
[C#]
public void NameTarHeader(
   TarHeader hdr,
   string name
);

Parameters

hdr

The TarHeader to fill in.

name

The tar entry name.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.ParseTarHeader Method

Parse an entry's TarHeader information from a header buffer.

[Visual Basic]
Public Sub ParseTarHeader( _
   ByVal hdr As ICSharpCode.SharpZipLib.Tar.TarHeader, _
   ByVal header As Byte() _
)
[C#]
public void ParseTarHeader(
   TarHeader hdr,
   byte[] header
);

Parameters

hdr

Parse an entry's TarHeader information from a header buffer.

header

The tar entry header buffer to get information from.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.SetIds Method

Convenience method to set this entry's group and user ids.

[Visual Basic]
Public Sub SetIds( _
   ByVal userId As Integer, _
   ByVal groupId As Integer _
)
[C#]
public void SetIds(
   int userId,
   int groupId
);

Parameters

userId

This entry's new user id.

groupId

This entry's new group id.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.SetNames Method

Convenience method to set this entry's group and user names.

[Visual Basic]
Public Sub SetNames( _
   ByVal userName As String, _
   ByVal groupName As String _
)
[C#]
public void SetNames(
   string userName,
   string groupName
);

Parameters

userName

This entry's new user name.

groupName

This entry's new group name.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarEntry.WriteEntryHeader Method

Write an entry's header information to a header buffer.

[Visual Basic]
Public Sub WriteEntryHeader( _
   ByVal outbuf As Byte() _
)
[C#]
public void WriteEntryHeader(
   byte[] outbuf
);

Parameters

outbuf

The tar entry header buffer to fill in.

See Also

TarEntry Class | TarEntry Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader Class

This class encapsulates the Tar Entry Header used in Tar Archives. The class also holds a number of tar constants, used mostly in headers.

For a list of all members of this type, see TarHeader Members.

System.Object
TarHeader

[Visual Basic]
Public Class TarHeader
   Implements ICloneable
[C#]
public class TarHeader : ICloneable

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader Members

Public Static (Shared) Fields

CHKSUMLEN | The length of the checksum field in a header buffer.
DEVLEN | The length of the devices field in a header buffer.
GIDLEN | The length of the group id field in a header buffer.
GNAMELEN | The length of the group name field in a header buffer.
GNU_TMAGIC | The magic tag representing a GNU tar archive.
LF_BLK | Block device file type.
LF_CHR | Character device file type.
LF_CONTIG | Contiguous file type.
LF_DIR | Directory file type.
LF_FIFO | FIFO (pipe) file type.
LF_LINK | Link file type.
LF_NORMAL | Normal file type.
LF_OLDNORM | LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type". This is the "old way" of indicating a normal file.
LF_SYMLINK | Symbolic link file type.
MAGICLEN | The length of the magic field in a header buffer.
MODELEN | The length of the mode field in a header buffer.
MODTIMELEN | The length of the modification time field in a header buffer.
NAMELEN | The length of the name field in a header buffer.
SIZELEN | The length of the size field in a header buffer.
TMAGIC | The magic tag representing a POSIX tar archive.
UIDLEN | The length of the user id field in a header buffer.
UNAMELEN | The length of the user name field in a header buffer.

Public Static (Shared) Methods

GetCheckSumOctalBytes | Parse the checksum octal integer from a header buffer.
GetLongOctalBytes | Parse an octal long integer from a header buffer.
GetNameBytes | Determine the number of bytes in an entry name.
GetOctalBytes | Parse an octal integer from a header buffer.
ParseName | Parse an entry name from a header buffer.
ParseOctal | Parse an octal string from a header buffer. This is used for the file permission mode value.

Public Instance Constructors

TarHeader Constructor

Public Instance Fields

checkSum | The entry's checksum.
devMajor | The entry's major device number.
devMinor | The entry's minor device number.
groupId | The entry's group id.
groupName | The entry's group name.
linkFlag | The entry's link flag.
linkName | The entry's link name.
magic | The entry's magic tag.
mode | The entry's permission mode.
modTime | The entry's modification time.
name | The entry's name.
size | The entry's size.
userId | The entry's user id.
userName | The entry's user name.

Public Instance Methods

Clone | TarHeaders can be cloned.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetName | Get the name of this entry.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarHeader Class | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader Constructor

[Visual Basic]
Public Sub New()
[C#]
public TarHeader();

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader Fields

The fields of the TarHeader class are listed below. For a complete list of TarHeader class members, see the TarHeader Members topic.

Public Static (Shared) Fields

CHKSUMLEN | The length of the checksum field in a header buffer.
DEVLEN | The length of the devices field in a header buffer.
GIDLEN | The length of the group id field in a header buffer.
GNAMELEN | The length of the group name field in a header buffer.
GNU_TMAGIC | The magic tag representing a GNU tar archive.
LF_BLK | Block device file type.
LF_CHR | Character device file type.
LF_CONTIG | Contiguous file type.
LF_DIR | Directory file type.
LF_FIFO | FIFO (pipe) file type.
LF_LINK | Link file type.
LF_NORMAL | Normal file type.
LF_OLDNORM | LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type". This is the "old way" of indicating a normal file.
LF_SYMLINK | Symbolic link file type.
MAGICLEN | The length of the magic field in a header buffer.
MODELEN | The length of the mode field in a header buffer.
MODTIMELEN | The length of the modification time field in a header buffer.
NAMELEN | The length of the name field in a header buffer.
SIZELEN | The length of the size field in a header buffer.
TMAGIC | The magic tag representing a POSIX tar archive.
UIDLEN | The length of the user id field in a header buffer.
UNAMELEN | The length of the user name field in a header buffer.

Public Instance Fields

checkSum | The entry's checksum.
devMajor | The entry's major device number.
devMinor | The entry's minor device number.
groupId | The entry's group id.
groupName | The entry's group name.
linkFlag | The entry's link flag.
linkName | The entry's link name.
magic | The entry's magic tag.
mode | The entry's permission mode.
modTime | The entry's modification time.
name | The entry's name.
size | The entry's size.
userId | The entry's user id.
userName | The entry's user name.

See Also

TarHeader Class | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.checkSum Field

The entry's checksum.

[Visual Basic]
Public checkSum As Integer
[C#]
public int checkSum;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.CHKSUMLEN Field

The length of the checksum field in a header buffer.

[Visual Basic]
Public Shared ReadOnly CHKSUMLEN As Integer
[C#]
public static readonly int CHKSUMLEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.DEVLEN Field

The length of the devices field in a header buffer.

[Visual Basic]
Public Shared ReadOnly DEVLEN As Integer
[C#]
public static readonly int DEVLEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.devMajor Field

The entry's major device number.

[Visual Basic]
Public devMajor As Integer
[C#]
public int devMajor;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.devMinor Field

The entry's minor device number.

[Visual Basic]
Public devMinor As Integer
[C#]
public int devMinor;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GIDLEN Field

The length of the group id field in a header buffer.

[Visual Basic]
Public Shared ReadOnly GIDLEN As Integer
[C#]
public static readonly int GIDLEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GNAMELEN Field

The length of the group name field in a header buffer.

[Visual Basic]
Public Shared ReadOnly GNAMELEN As Integer
[C#]
public static readonly int GNAMELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GNU_TMAGIC Field

The magic tag representing a GNU tar archive.

[Visual Basic]
Public Shared ReadOnly GNU_TMAGIC As String
[C#]
public static readonly string GNU_TMAGIC;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.groupId Field

The entry's group id.

[Visual Basic]
Public groupId As Integer
[C#]
public int groupId;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.groupName Field

The entry's group name.

[Visual Basic]
Public groupName As System.Text.StringBuilder
[C#]
public StringBuilder groupName;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_BLK Field

Block device file type.

[Visual Basic]
Public Shared ReadOnly LF_BLK As Byte
[C#]
public static readonly byte LF_BLK;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_CHR Field

Character device file type.

[Visual Basic]
Public Shared ReadOnly LF_CHR As Byte
[C#]
public static readonly byte LF_CHR;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_CONTIG Field

Contiguous file type.

[Visual Basic]
Public Shared ReadOnly LF_CONTIG As Byte
[C#]
public static readonly byte LF_CONTIG;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_DIR Field

Directory file type.

[Visual Basic]
Public Shared ReadOnly LF_DIR As Byte
[C#]
public static readonly byte LF_DIR;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_FIFO Field

FIFO (pipe) file type.

[Visual Basic]
Public Shared ReadOnly LF_FIFO As Byte
[C#]
public static readonly byte LF_FIFO;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_LINK Field

Link file type.

[Visual Basic]
Public Shared ReadOnly LF_LINK As Byte
[C#]
public static readonly byte LF_LINK;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_NORMAL Field

Normal file type.

[Visual Basic]
Public Shared ReadOnly LF_NORMAL As Byte
[C#]
public static readonly byte LF_NORMAL;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_OLDNORM Field

LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type". This is the "old way" of indicating a normal file.

[Visual Basic]
Public Shared ReadOnly LF_OLDNORM As Byte
[C#]
public static readonly byte LF_OLDNORM;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.LF_SYMLINK Field

Symbolic link file type.

[Visual Basic]
Public Shared ReadOnly LF_SYMLINK As Byte
[C#]
public static readonly byte LF_SYMLINK;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.linkFlag Field

The entry's link flag.

[Visual Basic]
Public linkFlag As Byte
[C#]
public byte linkFlag;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.linkName Field

The entry's link name.

[Visual Basic]
Public linkName As System.Text.StringBuilder
[C#]
public StringBuilder linkName;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.magic Field

The entry's magic tag.

[Visual Basic]
Public magic As System.Text.StringBuilder
[C#]
public StringBuilder magic;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.MAGICLEN Field

The length of the magic field in a header buffer.

[Visual Basic]
Public Shared ReadOnly MAGICLEN As Integer
[C#]
public static readonly int MAGICLEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.mode Field

The entry's permission mode.

[Visual Basic]
Public mode As Integer
[C#]
public int mode;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.MODELEN Field

The length of the mode field in a header buffer.

[Visual Basic]
Public Shared ReadOnly MODELEN As Integer
[C#]
public static readonly int MODELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.modTime Field

The entry's modification time.

[Visual Basic]
Public modTime As Date
[C#]
public DateTime modTime;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.MODTIMELEN Field

The length of the modification time field in a header buffer.

[Visual Basic]
Public Shared ReadOnly MODTIMELEN As Integer
[C#]
public static readonly int MODTIMELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.name Field

The entry's name.

[Visual Basic]
Public name As System.Text.StringBuilder
[C#]
public StringBuilder name;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.NAMELEN Field

The length of the name field in a header buffer.

[Visual Basic]
Public Shared ReadOnly NAMELEN As Integer
[C#]
public static readonly int NAMELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.size Field

The entry's size.

[Visual Basic]
Public size As Long
[C#]
public long size;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.SIZELEN Field

The length of the size field in a header buffer.

[Visual Basic]
Public Shared ReadOnly SIZELEN As Integer
[C#]
public static readonly int SIZELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.TMAGIC Field

The magic tag representing a POSIX tar archive.

[Visual Basic]
Public Shared ReadOnly TMAGIC As String
[C#]
public static readonly string TMAGIC;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.UIDLEN Field

The length of the user id field in a header buffer.

[Visual Basic]
Public Shared ReadOnly UIDLEN As Integer
[C#]
public static readonly int UIDLEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.UNAMELEN Field

The length of the user name field in a header buffer.

[Visual Basic]
Public Shared ReadOnly UNAMELEN As Integer
[C#]
public static readonly int UNAMELEN;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.userId Field

The entry's user id.

[Visual Basic]
Public userId As Integer
[C#]
public int userId;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.userName Field

The entry's user name.

[Visual Basic]
Public userName As System.Text.StringBuilder
[C#]
public StringBuilder userName;

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader Methods

The methods of the TarHeader class are listed below. For a complete list of TarHeader class members, see the TarHeader Members topic.

Public Static (Shared) Methods

GetCheckSumOctalBytes | Parse the checksum octal integer from a header buffer.
GetLongOctalBytes | Parse an octal long integer from a header buffer.
GetNameBytes | Determine the number of bytes in an entry name.
GetOctalBytes | Parse an octal integer from a header buffer.
ParseName | Parse an entry name from a header buffer.
ParseOctal | Parse an octal string from a header buffer. This is used for the file permission mode value.

Public Instance Methods

Clone | TarHeaders can be cloned.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetName | Get the name of this entry.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarHeader Class | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.Clone Method

TarHeaders can be cloned.

[Visual Basic]
NotOverridable Public Function Clone() As Object
[C#]
public final object Clone();

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GetCheckSumOctalBytes Method

Parse the checksum octal integer from a header buffer.

[Visual Basic]
Public Shared Function GetCheckSumOctalBytes( _
   ByVal val As Long, _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public static int GetCheckSumOctalBytes(
   long val,
   byte[] buf,
   int offset,
   int length
);

Parameters

val

buf

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The integer value of the entry's checksum.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GetLongOctalBytes Method

Parse an octal long integer from a header buffer.

[Visual Basic]
Public Shared Function GetLongOctalBytes( _
   ByVal val As Long, _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public static int GetLongOctalBytes(
   long val,
   byte[] buf,
   int offset,
   int length
);

Parameters

val

buf

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The long value of the octal bytes.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GetName Method

Get the name of this entry.

[Visual Basic]
Public Function GetName() As String
[C#]
public string GetName();

Return Value

The entry's name.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GetNameBytes Method

Determine the number of bytes in an entry name.

[Visual Basic]
Public Shared Function GetNameBytes( _
   ByVal name As System.Text.StringBuilder, _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public static int GetNameBytes(
   StringBuilder name,
   byte[] buf,
   int offset,
   int length
);

Parameters

name

buf

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The number of bytes in a header's entry name.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.GetOctalBytes Method

Parse an octal integer from a header buffer.

[Visual Basic]
Public Shared Function GetOctalBytes( _
   ByVal val As Long, _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public static int GetOctalBytes(
   long val,
   byte[] buf,
   int offset,
   int length
);

Parameters

val

buf

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The integer value of the octal bytes.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.ParseName Method

Parse an entry name from a header buffer.

[Visual Basic]
Public Shared Function ParseName( _
   ByVal header As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As System.Text.StringBuilder
[C#]
public static StringBuilder ParseName(
   byte[] header,
   int offset,
   int length
);

Parameters

header

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The header's entry name.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarHeader.ParseOctal Method

Parse an octal string from a header buffer. This is used for the file permission mode value.

[Visual Basic]
Public Shared Function ParseOctal( _
   ByVal header As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public static long ParseOctal(
   byte[] header,
   int offset,
   int length
);

Parameters

header

The header buffer from which to parse.

offset

The offset into the buffer from which to parse.

length

The number of header bytes to parse.

Return Value

The long value of the octal string.

See Also

TarHeader Class | TarHeader Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Class

The TarInputStream reads a UNIX tar archive as an InputStream. methods are provided to position at each successive entry in the archive, and the read each entry as a normal input stream using read().

For a list of all members of this type, see TarInputStream Members.

System.Object
MarshalByRefObject
Stream
TarInputStream

[Visual Basic]
Public Class TarInputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class TarInputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Members

Public Instance Constructors

TarInputStream Overloaded. Initialize a new instance of the TarInputStream class.

Public Instance Properties

Available | Get the available data that can be read from the current entry in the archive. This does not indicate how much data is left in the entire archive, only in the current entry. This value is determined from the entry's size header field and the amount of data already read from the current entry.
CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
IsMarkSupported | Since we do not support marking just yet, we return false.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes this stream. Calls the TarBuffer's close() method. The underlying stream is closed by the TarBuffer.
CopyEntryContents | Copies the contents of the current tar archive entry directly into an output stream.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetNextEntry | Get the next entry in this tar archive. This will skip over any remaining data in the current entry, if there is one, and place the input stream at the header of the next entry, and read the header and instantiate a new TarEntry from the header bytes and return that entry. If there are no more entries in the archive, null will be returned to indicate that the end of the archive has been reached.
GetRecordSize | Get the record size being used by this stream's TarBuffer.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Mark | Since we do not support marking just yet, we do nothing.
Read | Reads bytes from the current tar archive entry. This method is aware of the boundaries of the current entry in the archive and will deal with them as if they entry in the archive and will deal with them as if they
ReadByte | Reads a byte from the current tar archive entry. This method simply calls read(byte[], int, int).
Reset | Since we do not support marking just yet, we do nothing.
Seek | I needed to implement the abstract member.
SetBufferDebug |
SetDebug |
SetEntryFactory |
SetLength | I needed to implement the abstract member.
Skip | Skip bytes in the input buffer. This skips bytes in the current entry's data, not the entire archive, and will stop at the end of the current entry's data if the number to skip extends beyond that point.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Fields

buffer
currEntry
debug
eFactory
entryOffset
entrySize
hasHitEOF
readBuf

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

TarInputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Constructor

An NDoc Documented Class Library

TarInputStream

Overload List

public TarInputStream(Stream);

public TarInputStream(Stream,int);

public TarInputStream(Stream,int,int);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Constructor (Stream)

[Visual Basic]
Overloads Public Sub New( _
   ByVal inputStream As System.IO.Stream _
)
[C#]
public TarInputStream(
   Stream inputStream
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream Constructor Overload List


TarInputStream Constructor (Stream, Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
)
[C#]
public TarInputStream(
   Stream inputStream,
   int blockSize
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream Constructor Overload List


TarInputStream Constructor (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal inputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
)
[C#]
public TarInputStream(
   Stream inputStream,
   int blockSize,
   int recordSize
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream Constructor Overload List


TarInputStream Fields

The fields of the TarInputStream class are listed below. For a complete list of TarInputStream class members, see the TarInputStream Members topic.

Protected Instance Fields

buffer
currEntry
debug
eFactory
entryOffset
entrySize
hasHitEOF
readBuf

See Also

TarInputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.buffer Field

[Visual Basic]
Protected buffer As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
protected TarBuffer buffer;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.currEntry Field

[Visual Basic]
Protected currEntry As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
protected TarEntry currEntry;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.debug Field

[Visual Basic]
Protected debug As Boolean
[C#]
protected bool debug;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.eFactory Field

[Visual Basic]
Protected eFactory As ICSharpCode.SharpZipLib.Tar.TarInputStream.IEntryFactory
[C#]
protected IEntryFactory eFactory;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.entryOffset Field

[Visual Basic]
Protected entryOffset As Integer
[C#]
protected int entryOffset;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.entrySize Field

[Visual Basic]
Protected entrySize As Integer
[C#]
protected int entrySize;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.hasHitEOF Field

[Visual Basic]
Protected hasHitEOF As Boolean
[C#]
protected bool hasHitEOF;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.readBuf Field

[Visual Basic]
Protected readBuf As Byte()
[C#]
protected byte[] readBuf;

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Properties

The properties of the TarInputStream class are listed below. For a complete list of TarInputStream class members, see the TarInputStream Members topic.

Public Instance Properties

Available | Get the available data that can be read from the current entry in the archive. This does not indicate how much data is left in the entire archive, only in the current entry. This value is determined from the entry's size header field and the amount of data already read from the current entry.
CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
IsMarkSupported | Since we do not support marking just yet, we return false.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

TarInputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Available Property

Get the available data that can be read from the current entry in the archive. This does not indicate how much data is left in the entire archive, only in the current entry. This value is determined from the entry's size header field and the amount of data already read from the current entry.

[Visual Basic]
Public ReadOnly Property Available As Integer
[C#]
public int Available {get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.IsMarkSupported Property

Since we do not support marking just yet, we return false.

[Visual Basic]
Public ReadOnly Property IsMarkSupported As Boolean
[C#]
public bool IsMarkSupported {get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream Methods

The methods of the TarInputStream class are listed below. For a complete list of TarInputStream class members, see the TarInputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes this stream. Calls the TarBuffer's close() method. The underlying stream is closed by the TarBuffer.
CopyEntryContents | Copies the contents of the current tar archive entry directly into an output stream.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetNextEntry | Get the next entry in this tar archive. This will skip over any remaining data in the current entry, if there is one, and place the input stream at the header of the next entry, and read the header and instantiate a new TarEntry from the header bytes and return that entry. If there are no more entries in the archive, null will be returned to indicate that the end of the archive has been reached.
GetRecordSize | Get the record size being used by this stream's TarBuffer.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Mark | Since we do not support marking just yet, we do nothing.
Read | Reads bytes from the current tar archive entry. This method is aware of the boundaries of the current entry in the archive and will deal with them as if they entry in the archive and will deal with them as if they
ReadByte | Reads a byte from the current tar archive entry. This method simply calls read(byte[], int, int).
Reset | Since we do not support marking just yet, we do nothing.
Seek | I needed to implement the abstract member.
SetBufferDebug |
SetDebug |
SetEntryFactory |
SetLength | I needed to implement the abstract member.
Skip | Skip bytes in the input buffer. This skips bytes in the current entry's data, not the entire archive, and will stop at the end of the current entry's data if the number to skip extends beyond that point.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

TarInputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Close Method

Closes this stream. Calls the TarBuffer's close() method. The underlying stream is closed by the TarBuffer.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.CopyEntryContents Method

Copies the contents of the current tar archive entry directly into an output stream.

[Visual Basic]
Public Sub CopyEntryContents( _
   ByVal outputStream As System.IO.Stream _
)
[C#]
public void CopyEntryContents(
   Stream outputStream
);

Parameters

outputStream

The OutputStream into which to write the entry's data.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Flush Method

Flushes the baseInputStream

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.GetNextEntry Method

Get the next entry in this tar archive. This will skip over any remaining data in the current entry, if there is one, and place the input stream at the header of the next entry, and read the header and instantiate a new TarEntry from the header bytes and return that entry. If there are no more entries in the archive, null will be returned to indicate that the end of the archive has been reached.

[Visual Basic]
Public Function GetNextEntry() As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public TarEntry GetNextEntry();

Return Value

The next TarEntry in the archive, or null.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.GetRecordSize Method

Get the record size being used by this stream's TarBuffer.

[Visual Basic]
Public Function GetRecordSize() As Integer
[C#]
public int GetRecordSize();

Return Value

TarBuffer record size.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Mark Method

Since we do not support marking just yet, we do nothing.

[Visual Basic]
Public Sub Mark( _
   ByVal markLimit As Integer _
)
[C#]
public void Mark(
   int markLimit
);

Parameters

markLimit

The limit to mark.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Read Method

Reads bytes from the current tar archive entry. This method is aware of the boundaries of the current entry in the archive and will deal with them as if they entry in the archive and will deal with them as if they

[Visual Basic]
Overrides Public Function Read( _
   ByVal buf As Byte(), _
   ByVal offset As Integer, _
   ByVal numToRead As Integer _
) As Integer
[C#]
public override int Read(
   byte[] buf,
   int offset,
   int numToRead
);

Parameters

buf

The buffer into which to place bytes read.

offset

The offset at which to place bytes read.

numToRead

The number of bytes to read.

Return Value

The number of bytes read, or -1 at EOF.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.ReadByte Method

Reads a byte from the current tar archive entry. This method simply calls read(byte[], int, int).

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Reset Method

Since we do not support marking just yet, we do nothing.

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.SetBufferDebug Method

[Visual Basic]
Public Sub SetBufferDebug( _
   ByVal debug As Boolean _
)
[C#]
public void SetBufferDebug(
   bool debug
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.SetDebug Method

[Visual Basic]
Public Sub SetDebug( _
   ByVal debugF As Boolean _
)
[C#]
public void SetDebug(
   bool debugF
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.SetEntryFactory Method

[Visual Basic]
Public Sub SetEntryFactory( _
   ByVal factory As ICSharpCode.SharpZipLib.Tar.TarInputStream.IEntryFactory _
)
[C#]
public void SetEntryFactory(
   IEntryFactory factory
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Skip Method

Skip bytes in the input buffer. This skips bytes in the current entry's data, not the entire archive, and will stop at the end of the current entry's data if the number to skip extends beyond that point.

[Visual Basic]
Public Sub Skip( _
   ByVal numToSkip As Integer _
)
[C#]
public void Skip(
   int numToSkip
);

Parameters

numToSkip

The number of bytes to skip.

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.Write Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal array As Byte(), _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public override void Write(
   byte[] array,
   int offset,
   int count
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.WriteByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal val As Byte _
)
[C#]
public override void WriteByte(
   byte val
);

See Also

TarInputStream Class | TarInputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.EntryFactoryAdapter Class

For a list of all members of this type, see TarInputStream.EntryFactoryAdapter Members.

System.Object
TarInputStream.EntryFactoryAdapter

[Visual Basic]
Public Class TarInputStream.EntryFactoryAdapter
   Implements IEntryFactory
[C#]
public class TarInputStream.EntryFactoryAdapter : IEntryFactory

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.EntryFactoryAdapter Members

Public Instance Constructors

TarInputStream.EntryFactoryAdapter Constructor

Public Instance Methods

CreateEntry | Overloaded.
CreateEntryFromFile |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarInputStream.EntryFactoryAdapter Class | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.EntryFactoryAdapter Constructor

[Visual Basic]
Public Sub New()
[C#]
public TarInputStream.EntryFactoryAdapter();

See Also

TarInputStream.EntryFactoryAdapter Class | TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.EntryFactoryAdapter Methods

The methods of the TarInputStream.EntryFactoryAdapter class are listed below. For a complete list of TarInputStream.EntryFactoryAdapter class members, see the TarInputStream.EntryFactoryAdapter Members topic.

Public Instance Methods

CreateEntry | Overloaded.
CreateEntryFromFile |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

TarInputStream.EntryFactoryAdapter Class | ICSharpCode.SharpZipLib.Tar Namespace


CreateEntry Method

An NDoc Documented Class Library

TarInputStream.EntryFactoryAdapter.CreateEntry

Overload List

public final TarEntry CreateEntry(byte[]);

public final TarEntry CreateEntry(string);

See Also

TarInputStream.EntryFactoryAdapter Class | TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.EntryFactoryAdapter.CreateEntry Method (Byte[])

[Visual Basic]
NotOverridable Overloads Public Function CreateEntry( _
   ByVal headerBuf As Byte() _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public final TarEntry CreateEntry(
   byte[] headerBuf
);

See Also

TarInputStream.EntryFactoryAdapter Class | TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream.EntryFactoryAdapter.CreateEntry Overload List


TarInputStream.EntryFactoryAdapter.CreateEntry Method (String)

[Visual Basic]
NotOverridable Overloads Public Function CreateEntry( _
   ByVal name As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public final TarEntry CreateEntry(
   string name
);

See Also

TarInputStream.EntryFactoryAdapter Class | TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream.EntryFactoryAdapter.CreateEntry Overload List


TarInputStream.EntryFactoryAdapter.CreateEntryFromFile Method

[Visual Basic]
NotOverridable Public Function CreateEntryFromFile( _
   ByVal fileName As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
public final TarEntry CreateEntryFromFile(
   string fileName
);

See Also

TarInputStream.EntryFactoryAdapter Class | TarInputStream.EntryFactoryAdapter Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.IEntryFactory Interface

This interface is provided, with the method setEntryFactory(), to allow the programmer to have their own TarEntry subclass instantiated for the entries return from getNextEntry().

For a list of all members of this type, see TarInputStream.IEntryFactory Members.

[Visual Basic]
Public Interface TarInputStream.IEntryFactory
[C#]
public interface TarInputStream.IEntryFactory

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarInputStream.IEntryFactory Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.IEntryFactory Members

Public Instance Methods

CreateEntry | Overloaded.
CreateEntryFromFile |

See Also

TarInputStream.IEntryFactory Interface | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.IEntryFactory Methods

The methods of the TarInputStream.IEntryFactory class are listed below. For a complete list of TarInputStream.IEntryFactory class members, see the TarInputStream.IEntryFactory Members topic.

Public Instance Methods

CreateEntry | Overloaded.
CreateEntryFromFile |

See Also

TarInputStream.IEntryFactory Interface | ICSharpCode.SharpZipLib.Tar Namespace


CreateEntry Method

An NDoc Documented Class Library

TarInputStream.IEntryFactory.CreateEntry

Overload List

TarEntry CreateEntry(byte[]);

TarEntry CreateEntry(string);

See Also

TarInputStream.IEntryFactory Interface | TarInputStream.IEntryFactory Members | ICSharpCode.SharpZipLib.Tar Namespace


TarInputStream.IEntryFactory.CreateEntry Method (Byte[])

[Visual Basic]
Function CreateEntry( _
   ByVal headerBuf As Byte() _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
TarEntry CreateEntry(
   byte[] headerBuf
);

See Also

TarInputStream.IEntryFactory Interface | TarInputStream.IEntryFactory Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream.IEntryFactory.CreateEntry Overload List


TarInputStream.IEntryFactory.CreateEntry Method (String)

[Visual Basic]
Function CreateEntry( _
   ByVal name As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
TarEntry CreateEntry(
   string name
);

See Also

TarInputStream.IEntryFactory Interface | TarInputStream.IEntryFactory Members | ICSharpCode.SharpZipLib.Tar Namespace | TarInputStream.IEntryFactory.CreateEntry Overload List


TarInputStream.IEntryFactory.CreateEntryFromFile Method

[Visual Basic]
Function CreateEntryFromFile( _
   ByVal fileName As String _
) As ICSharpCode.SharpZipLib.Tar.TarEntry
[C#]
TarEntry CreateEntryFromFile(
   string fileName
);

See Also

TarInputStream.IEntryFactory Interface | TarInputStream.IEntryFactory Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Class

The TarOutputStream writes a UNIX tar archive as an OutputStream. Methods are provided to put entries, and then write their contents by writing to this stream using write().

For a list of all members of this type, see TarOutputStream Members.

System.Object
MarshalByRefObject
Stream
TarOutputStream

[Visual Basic]
Public Class TarOutputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class TarOutputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.Tar Namespace

Assembly: SharpZipLib.dll

See Also

TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Members

Public Instance Constructors

TarOutputStream Overloaded. Initialize a new instance of the TarOutputStream class.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Ends the TAR archive and closes the underlying OutputStream. This means that finish() is called followed by calling the TarBuffer's close().
CloseEntry | Close an entry. This method MUST be called for all file entries that contain data. The reason is that we must buffer data written to the stream in order to satisfy the buffer's record based writes. Thus, there may be data fragments still being assembled that must be written to the output stream before this entry is closed and the next entry written.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Ends the TAR archive without closing the underlying OutputStream. The result is that the EOF record of nulls is written.
Flush |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetRecordSize | Get the record size being used by this stream's TarBuffer.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
PutNextEntry | Put an entry on the output stream. This writes the entry's header record and positions the output stream for writing the contents of the entry. Once this method is called, the stream is ready for calls to write() to write the entry's contents. Once the contents are written, closeEntry() MUST be called to ensure that all buffered data is completely written to the output stream.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetBufferDebug |
SetDebug | Sets the debugging flag.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes bytes to the current tar archive entry. This method is aware of the current entry and will throw an exception if you attempt to write bytes past the length specified for the current entry. The method is also (painfully) aware of the record buffering required by TarBuffer, and manages buffers that are not a multiple of recordsize in length, including assembling records from small buffers.
WriteByte | Writes a byte to the current tar archive entry. This method simply calls Write(byte[], int, int).

Protected Instance Fields

assemBuf
assemLen
buffer
currBytes
currSize
debug
outputStream
recordBuf

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

TarOutputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Constructor

An NDoc Documented Class Library

TarOutputStream

Overload List

public TarOutputStream(Stream);

public TarOutputStream(Stream,int);

public TarOutputStream(Stream,int,int);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Constructor (Stream)

[Visual Basic]
Overloads Public Sub New( _
   ByVal outputStream As System.IO.Stream _
)
[C#]
public TarOutputStream(
   Stream outputStream
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarOutputStream Constructor Overload List


TarOutputStream Constructor (Stream, Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer _
)
[C#]
public TarOutputStream(
   Stream outputStream,
   int blockSize
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarOutputStream Constructor Overload List


TarOutputStream Constructor (Stream, Int32, Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal outputStream As System.IO.Stream, _
   ByVal blockSize As Integer, _
   ByVal recordSize As Integer _
)
[C#]
public TarOutputStream(
   Stream outputStream,
   int blockSize,
   int recordSize
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace | TarOutputStream Constructor Overload List


TarOutputStream Fields

The fields of the TarOutputStream class are listed below. For a complete list of TarOutputStream class members, see the TarOutputStream Members topic.

Protected Instance Fields

assemBuf
assemLen
buffer
currBytes
currSize
debug
outputStream
recordBuf

See Also

TarOutputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.assemBuf Field

[Visual Basic]
Protected assemBuf As Byte()
[C#]
protected byte[] assemBuf;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.assemLen Field

[Visual Basic]
Protected assemLen As Integer
[C#]
protected int assemLen;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.buffer Field

[Visual Basic]
Protected buffer As ICSharpCode.SharpZipLib.Tar.TarBuffer
[C#]
protected TarBuffer buffer;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.currBytes Field

[Visual Basic]
Protected currBytes As Integer
[C#]
protected int currBytes;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.currSize Field

[Visual Basic]
Protected currSize As Integer
[C#]
protected int currSize;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.debug Field

[Visual Basic]
Protected debug As Boolean
[C#]
protected bool debug;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.outputStream Field

[Visual Basic]
Protected outputStream As System.IO.Stream
[C#]
protected Stream outputStream;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.recordBuf Field

[Visual Basic]
Protected recordBuf As Byte()
[C#]
protected byte[] recordBuf;

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Properties

The properties of the TarOutputStream class are listed below. For a complete list of TarOutputStream class members, see the TarOutputStream Members topic.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

TarOutputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream Methods

The methods of the TarOutputStream class are listed below. For a complete list of TarOutputStream class members, see the TarOutputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Ends the TAR archive and closes the underlying OutputStream. This means that finish() is called followed by calling the TarBuffer's close().
CloseEntry | Close an entry. This method MUST be called for all file entries that contain data. The reason is that we must buffer data written to the stream in order to satisfy the buffer's record based writes. Thus, there may be data fragments still being assembled that must be written to the output stream before this entry is closed and the next entry written.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Ends the TAR archive without closing the underlying OutputStream. The result is that the EOF record of nulls is written.
Flush |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetRecordSize | Get the record size being used by this stream's TarBuffer.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
PutNextEntry | Put an entry on the output stream. This writes the entry's header record and positions the output stream for writing the contents of the entry. Once this method is called, the stream is ready for calls to write() to write the entry's contents. Once the contents are written, closeEntry() MUST be called to ensure that all buffered data is completely written to the output stream.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetBufferDebug |
SetDebug | Sets the debugging flag.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes bytes to the current tar archive entry. This method is aware of the current entry and will throw an exception if you attempt to write bytes past the length specified for the current entry. The method is also (painfully) aware of the record buffering required by TarBuffer, and manages buffers that are not a multiple of recordsize in length, including assembling records from small buffers.
WriteByte | Writes a byte to the current tar archive entry. This method simply calls Write(byte[], int, int).

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

TarOutputStream Class | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Close Method

Ends the TAR archive and closes the underlying OutputStream. This means that finish() is called followed by calling the TarBuffer's close().

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.CloseEntry Method

Close an entry. This method MUST be called for all file entries that contain data. The reason is that we must buffer data written to the stream in order to satisfy the buffer's record based writes. Thus, there may be data fragments still being assembled that must be written to the output stream before this entry is closed and the next entry written.

[Visual Basic]
Public Sub CloseEntry()
[C#]
public void CloseEntry();

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Finish Method

Ends the TAR archive without closing the underlying OutputStream. The result is that the EOF record of nulls is written.

[Visual Basic]
Public Sub Finish()
[C#]
public void Finish();

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Flush Method

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.GetRecordSize Method

Get the record size being used by this stream's TarBuffer.

[Visual Basic]
Public Function GetRecordSize() As Integer
[C#]
public int GetRecordSize();

Return Value

The TarBuffer record size.

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.PutNextEntry Method

Put an entry on the output stream. This writes the entry's header record and positions the output stream for writing the contents of the entry. Once this method is called, the stream is ready for calls to write() to write the entry's contents. Once the contents are written, closeEntry() MUST be called to ensure that all buffered data is completely written to the output stream.

[Visual Basic]
Public Sub PutNextEntry( _
   ByVal entry As ICSharpCode.SharpZipLib.Tar.TarEntry _
)
[C#]
public void PutNextEntry(
   TarEntry entry
);

Parameters

entry

The TarEntry to be written to the archive.

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Read Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.ReadByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.SetBufferDebug Method

[Visual Basic]
Public Sub SetBufferDebug( _
   ByVal debug As Boolean _
)
[C#]
public void SetBufferDebug(
   bool debug
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.SetDebug Method

Sets the debugging flag.

[Visual Basic]
Public Sub SetDebug( _
   ByVal debugF As Boolean _
)
[C#]
public void SetDebug(
   bool debugF
);

Parameters

debugF

True to turn on debugging.

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.Write Method

Writes bytes to the current tar archive entry. This method is aware of the current entry and will throw an exception if you attempt to write bytes past the length specified for the current entry. The method is also (painfully) aware of the record buffering required by TarBuffer, and manages buffers that are not a multiple of recordsize in length, including assembling records from small buffers.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal wBuf As Byte(), _
   ByVal wOffset As Integer, _
   ByVal numToWrite As Integer _
)
[C#]
public override void Write(
   byte[] wBuf,
   int wOffset,
   int numToWrite
);

Parameters

wBuf

The buffer to write to the archive.

wOffset

The offset in the buffer from which to get bytes.

numToWrite

The number of bytes to write.

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


TarOutputStream.WriteByte Method

Writes a byte to the current tar archive entry. This method simply calls Write(byte[], int, int).

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal b As Byte _
)
[C#]
public override void WriteByte(
   byte b
);

Parameters

b

The byte written.

See Also

TarOutputStream Class | TarOutputStream Members | ICSharpCode.SharpZipLib.Tar Namespace


ICSharpCode.SharpZipLib.Zip

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip Namespace

Namespace hierarchy

Classes

Class | Description
ZipConstants | This class contains constants used for zip.
ZipEntry | This class represents a member of a zip archive. ZipFile and ZipInputStream will give you instances of this class as information about the members in an archive. On the other hand ZipOutputStream needs an instance of this class to create a new member. author of the original java version : Jochen Hoenicke
ZipFile | This class represents a Zip archive. You can ask for the contained entries, or get an input stream for a file entry. The entry is automatically decompressed. This class is thread safe: You can open input streams for arbitrary entries in different threads. author of the original java version : Jochen Hoenicke
ZipInputStream | This is a FilterInputStream that reads the files baseInputStream an zip archive one after another. It has a special method to get the zip entry of the next file. The zip entry contains information about the file name size, compressed size, CRC, etc. It includes support for STORED and DEFLATED entries. author of the original java version : Jochen Hoenicke
ZipOutputStream | This is a FilterOutputStream that writes the files into a zip archive one after another. It has a special method to start a new zip entry. The zip entries contains information about the file name size, compressed size, CRC, etc. It includes support for STORED and DEFLATED entries. This class is not thread safe. author of the original java version : Jochen Hoenicke

Enumerations

Enumeration | Description
CompressionMethod |


CompressionMethod Enumeration

[Visual Basic]
Public Enum CompressionMethod
[C#]
public enum CompressionMethod

Members

Member Name | Description
Stored |
Deflated |

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants Class

This class contains constants used for zip.

For a list of all members of this type, see ZipConstants Members.

System.Object
ZipConstants

[Visual Basic]
NotInheritable Public Class ZipConstants
[C#]
public sealed class ZipConstants

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants Members

Public Static (Shared) Fields

CENATT
CENATX
CENCOM
CENCRC
CENDSK
CENEXT
CENFLG
CENHDR
CENHOW
CENLEN
CENNAM
CENOFF
CENSIG
CENSIG64
CENSIZ
CENTIM
CENVEM
CENVER
ENDCOM
ENDDCD
ENDHDR
ENDNRD
ENDOFF
ENDSIG
ENDSIZ
ENDSUB
ENDTOT
EXTCRC
EXTHDR
EXTLEN
EXTSIG
EXTSIZ
LOCCRC
LOCEXT
LOCFLG
LOCHDR
LOCHOW
LOCLEN
LOCNAM
LOCSIG
LOCSIZ
LOCTIM
LOCVER

Public Static (Shared) Methods

ConvertToArray
ConvertToString

Public Instance Constructors

ZipConstants Constructor

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipConstants Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants Constructor

[Visual Basic]
Public Sub New()
[C#]
public ZipConstants();

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants Fields

The fields of the ZipConstants class are listed below. For a complete list of ZipConstants class members, see the ZipConstants Members topic.

Public Static (Shared) Fields

CENATT
CENATX
CENCOM
CENCRC
CENDSK
CENEXT
CENFLG
CENHDR
CENHOW
CENLEN
CENNAM
CENOFF
CENSIG
CENSIG64
CENSIZ
CENTIM
CENVEM
CENVER
ENDCOM
ENDDCD
ENDHDR
ENDNRD
ENDOFF
ENDSIG
ENDSIZ
ENDSUB
ENDTOT
EXTCRC
EXTHDR
EXTLEN
EXTSIG
EXTSIZ
LOCCRC
LOCEXT
LOCFLG
LOCHDR
LOCHOW
LOCLEN
LOCNAM
LOCSIG
LOCSIZ
LOCTIM
LOCVER

See Also

ZipConstants Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENATT Field

[Visual Basic]
Public Shared CENATT As Integer
[C#]
public static int CENATT;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENATX Field

[Visual Basic]
Public Shared CENATX As Integer
[C#]
public static int CENATX;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENCOM Field

[Visual Basic]
Public Shared CENCOM As Integer
[C#]
public static int CENCOM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENCRC Field

[Visual Basic]
Public Shared CENCRC As Integer
[C#]
public static int CENCRC;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENDSK Field

[Visual Basic]
Public Shared CENDSK As Integer
[C#]
public static int CENDSK;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENEXT Field

[Visual Basic]
Public Shared CENEXT As Integer
[C#]
public static int CENEXT;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENFLG Field

[Visual Basic]
Public Shared CENFLG As Integer
[C#]
public static int CENFLG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENHDR Field

[Visual Basic]
Public Shared CENHDR As Integer
[C#]
public static int CENHDR;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENHOW Field

[Visual Basic]
Public Shared CENHOW As Integer
[C#]
public static int CENHOW;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENLEN Field

[Visual Basic]
Public Shared CENLEN As Integer
[C#]
public static int CENLEN;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENNAM Field

[Visual Basic]
Public Shared CENNAM As Integer
[C#]
public static int CENNAM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENOFF Field

[Visual Basic]
Public Shared CENOFF As Integer
[C#]
public static int CENOFF;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENSIG Field

[Visual Basic]
Public Shared CENSIG As Integer
[C#]
public static int CENSIG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENSIG64 Field

[Visual Basic]
Public Shared CENSIG64 As Integer
[C#]
public static int CENSIG64;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENSIZ Field

[Visual Basic]
Public Shared CENSIZ As Integer
[C#]
public static int CENSIZ;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENTIM Field

[Visual Basic]
Public Shared CENTIM As Integer
[C#]
public static int CENTIM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENVEM Field

[Visual Basic]
Public Shared CENVEM As Integer
[C#]
public static int CENVEM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.CENVER Field

[Visual Basic]
Public Shared CENVER As Integer
[C#]
public static int CENVER;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDCOM Field

[Visual Basic]
Public Shared ENDCOM As Integer
[C#]
public static int ENDCOM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDDCD Field

[Visual Basic]
Public Shared ENDDCD As Integer
[C#]
public static int ENDDCD;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDHDR Field

[Visual Basic]
Public Shared ENDHDR As Integer
[C#]
public static int ENDHDR;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDNRD Field

[Visual Basic]
Public Shared ENDNRD As Integer
[C#]
public static int ENDNRD;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDOFF Field

[Visual Basic]
Public Shared ENDOFF As Integer
[C#]
public static int ENDOFF;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDSIG Field

[Visual Basic]
Public Shared ENDSIG As Integer
[C#]
public static int ENDSIG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDSIZ Field

[Visual Basic]
Public Shared ENDSIZ As Integer
[C#]
public static int ENDSIZ;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDSUB Field

[Visual Basic]
Public Shared ENDSUB As Integer
[C#]
public static int ENDSUB;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ENDTOT Field

[Visual Basic]
Public Shared ENDTOT As Integer
[C#]
public static int ENDTOT;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.EXTCRC Field

[Visual Basic]
Public Shared EXTCRC As Integer
[C#]
public static int EXTCRC;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.EXTHDR Field

[Visual Basic]
Public Shared EXTHDR As Integer
[C#]
public static int EXTHDR;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.EXTLEN Field

[Visual Basic]
Public Shared EXTLEN As Integer
[C#]
public static int EXTLEN;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.EXTSIG Field

[Visual Basic]
Public Shared EXTSIG As Integer
[C#]
public static int EXTSIG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.EXTSIZ Field

[Visual Basic]
Public Shared EXTSIZ As Integer
[C#]
public static int EXTSIZ;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCCRC Field

[Visual Basic]
Public Shared LOCCRC As Integer
[C#]
public static int LOCCRC;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCEXT Field

[Visual Basic]
Public Shared LOCEXT As Integer
[C#]
public static int LOCEXT;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCFLG Field

[Visual Basic]
Public Shared LOCFLG As Integer
[C#]
public static int LOCFLG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCHDR Field

[Visual Basic]
Public Shared LOCHDR As Integer
[C#]
public static int LOCHDR;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCHOW Field

[Visual Basic]
Public Shared LOCHOW As Integer
[C#]
public static int LOCHOW;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCLEN Field

[Visual Basic]
Public Shared LOCLEN As Integer
[C#]
public static int LOCLEN;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCNAM Field

[Visual Basic]
Public Shared LOCNAM As Integer
[C#]
public static int LOCNAM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCSIG Field

[Visual Basic]
Public Shared LOCSIG As Integer
[C#]
public static int LOCSIG;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCSIZ Field

[Visual Basic]
Public Shared LOCSIZ As Integer
[C#]
public static int LOCSIZ;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCTIM Field

[Visual Basic]
Public Shared LOCTIM As Integer
[C#]
public static int LOCTIM;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.LOCVER Field

[Visual Basic]
Public Shared LOCVER As Integer
[C#]
public static int LOCVER;

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants Methods

The methods of the ZipConstants class are listed below. For a complete list of ZipConstants class members, see the ZipConstants Members topic.

Public Static (Shared) Methods

ConvertToArray
ConvertToString

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipConstants Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ConvertToArray Method

[Visual Basic]
Public Shared Function ConvertToArray( _
   ByVal str As String _
) As Byte()
[C#]
public static byte[] ConvertToArray(
   string str
);

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipConstants.ConvertToString Method

[Visual Basic]
Public Shared Function ConvertToString( _
   ByVal data As Byte() _
) As String
[C#]
public static string ConvertToString(
   byte[] data
);

See Also

ZipConstants Class | ZipConstants Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Class

This class represents a member of a zip archive. ZipFile and ZipInputStream will give you instances of this class as information about the members in an archive. On the other hand ZipOutputStream needs an instance of this class to create a new member. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see ZipEntry Members.

System.Object
ZipEntry

[Visual Basic]
Public Class ZipEntry
   Implements ICloneable
[C#]
public class ZipEntry : ICloneable

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Members

Public Instance Constructors

ZipEntry Overloaded. Initialize a new instance of the ZipEntry class.

Public Instance Fields

flags
offset
zipFileIndex

Public Instance Properties

Comment | Gets/Sets the entry comment.
CompressedSize | Gets/Sets the size of the compressed data.
CompressionMethod | Gets/Sets the compression method. Only DEFLATED and STORED are supported.
Crc | Gets/Sets the crc of the uncompressed data.
DateTime | Gets/Sets the time of last modification of the entry.
DosTime |
ExtraData | Gets/Sets the extra data.
IsDirectory | Gets true, if the entry is a directory. This is solely determined by the name, a trailing slash '/' marks a directory.
Name | Returns the entry name. The path components in the entry are always separated by slashes ('/').
Size | Gets/Sets the size of the uncompressed data.
Version |

Public Instance Methods

Clone | Creates a copy of this zip entry.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString | Gets the string representation of this ZipEntry. This is just the name as returned by getName().

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipEntry Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Constructor

An NDoc Documented Class Library

ZipEntry

Creates a zip entry with the given name.

Overload List

Creates a zip entry with the given name.

public ZipEntry(string);

Creates a copy of the given zip entry.

public ZipEntry(ZipEntry);

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Constructor (String)

Creates a zip entry with the given name.

[Visual Basic]
Overloads Public Sub New( _
   ByVal name As String _
)
[C#]
public ZipEntry(
   string name
);

Parameters

name

the name. May include directory components separated by '/'.

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace | ZipEntry Constructor Overload List


ZipEntry Constructor (ZipEntry)

Creates a copy of the given zip entry.

[Visual Basic]
Overloads Public Sub New( _
   ByVal e As ICSharpCode.SharpZipLib.Zip.ZipEntry _
)
[C#]
public ZipEntry(
   ZipEntry e
);

Parameters

e

the entry to copy.

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace | ZipEntry Constructor Overload List


ZipEntry Fields

The fields of the ZipEntry class are listed below. For a complete list of ZipEntry class members, see the ZipEntry Members topic.

Public Instance Fields

flags
offset
zipFileIndex

See Also

ZipEntry Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.flags Field

[Visual Basic]
Public flags As Integer
[C#]
public int flags;

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.offset Field

[Visual Basic]
Public offset As Integer
[C#]
public int offset;

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.zipFileIndex Field

[Visual Basic]
Public zipFileIndex As Integer
[C#]
public int zipFileIndex;

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Properties

The properties of the ZipEntry class are listed below. For a complete list of ZipEntry class members, see the ZipEntry Members topic.

Public Instance Properties

Comment | Gets/Sets the entry comment.
CompressedSize | Gets/Sets the size of the compressed data.
CompressionMethod | Gets/Sets the compression method. Only DEFLATED and STORED are supported.
Crc | Gets/Sets the crc of the uncompressed data.
DateTime | Gets/Sets the time of last modification of the entry.
DosTime |
ExtraData | Gets/Sets the extra data.
IsDirectory | Gets true, if the entry is a directory. This is solely determined by the name, a trailing slash '/' marks a directory.
Name | Returns the entry name. The path components in the entry are always separated by slashes ('/').
Size | Gets/Sets the size of the uncompressed data.
Version |

See Also

ZipEntry Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Comment Property

Gets/Sets the entry comment.

[Visual Basic]
Public Property Comment As String
[C#]
public string Comment {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if comment is longer than 0xffff.

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.CompressedSize Property

Gets/Sets the size of the compressed data.

[Visual Basic]
Public Property CompressedSize As Long
[C#]
public long CompressedSize {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if csize is not in 0..0xffffffffL

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.CompressionMethod Property

Gets/Sets the compression method. Only DEFLATED and STORED are supported.

[Visual Basic]
Public Property CompressionMethod As ICSharpCode.SharpZipLib.Zip.CompressionMethod
[C#]
public CompressionMethod CompressionMethod {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if method is not supported.

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Crc Property

Gets/Sets the crc of the uncompressed data.

[Visual Basic]
Public Property Crc As Long
[C#]
public long Crc {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if crc is not in 0..0xffffffffL

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.DateTime Property

Gets/Sets the time of last modification of the entry.

[Visual Basic]
Public Property DateTime As Date
[C#]
public System.DateTime DateTime {get; set;}

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.DosTime Property

[Visual Basic]
Public Property DosTime As Integer
[C#]
public int DosTime {get; set;}

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.ExtraData Property

Gets/Sets the extra data.

[Visual Basic]
Public Property ExtraData As Byte()
[C#]
public byte[] ExtraData {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if extra is longer than 0xffff bytes.

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.IsDirectory Property

Gets true, if the entry is a directory. This is solely determined by the name, a trailing slash '/' marks a directory.

[Visual Basic]
Public ReadOnly Property IsDirectory As Boolean
[C#]
public bool IsDirectory {get;}

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Name Property

Returns the entry name. The path components in the entry are always separated by slashes ('/').

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Size Property

Gets/Sets the size of the uncompressed data.

[Visual Basic]
Public Property Size As Long
[C#]
public long Size {get; set;}

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if size is not in 0..0xffffffffL

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Version Property

[Visual Basic]
Public Property Version As System.UInt16
[C#]
public ushort Version {get; set;}

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry Methods

The methods of the ZipEntry class are listed below. For a complete list of ZipEntry class members, see the ZipEntry Members topic.

Public Instance Methods

Clone | Creates a copy of this zip entry.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString | Gets the string representation of this ZipEntry. This is just the name as returned by getName().

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipEntry Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.Clone Method

Creates a copy of this zip entry.

[Visual Basic]
NotOverridable Public Function Clone() As Object
[C#]
public final object Clone();

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipEntry.ToString Method

Gets the string representation of this ZipEntry. This is just the name as returned by getName().

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

See Also

ZipEntry Class | ZipEntry Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile Class

This class represents a Zip archive. You can ask for the contained entries, or get an input stream for a file entry. The entry is automatically decompressed. This class is thread safe: You can open input streams for arbitrary entries in different threads. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see ZipFile Members.

System.Object
ZipFile

[Visual Basic]
Public Class ZipFile
   Implements IEnumerable
[C#]
public class ZipFile : IEnumerable

Example

using System;
using System.Text;
using System.Collections;
using System.IO;

using NZlib.Zip;

class MainClass
{
    static public void Main(string[] args)
    {
        ZipFile zFile = new ZipFile(args[0]);
        Console.WriteLine("Listing of : " + zFile.Name);
        Console.WriteLine("");
        Console.WriteLine("Raw Size    Size      Date     Time     Name");
        Console.WriteLine("--------  --------  --------  ------  ---------");
        foreach (ZipEntry e in zFile) {
            DateTime d = e.DateTime;
            Console.WriteLine("{0, -10}{1, -10}{2}  {3}   {4}", e.Size, e.CompressedSize,
                                                                d.ToString("dd-MM-yy"), d.ToString("t"),
                                                                e.Name);
        }
    }
}

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile Members

Public Instance Constructors

ZipFile Overloaded. Initialize a new instance of the ZipFile class.

Public Instance Properties

Name | Returns the name of this zip file.
Size | Returns the number of entries in this zip file.

Public Instance Methods

Close | Closes the ZipFile. This also closes all input streams given by this class. After this is called, no further method should be called.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetEntry | Searches for a zip entry in this archive with the given name.
GetEnumerator | Returns an IEnumerator of all Zip entries in this Zip file.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetInputStream | Creates an input stream reading the given zip entry as uncompressed data. Normally zip entry should be an entry returned by GetEntry().
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipFile Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile Constructor

An NDoc Documented Class Library

ZipFile

Opens a Zip file with the given name for reading.

Overload List

Opens a Zip file with the given name for reading.

public ZipFile(string);

Opens a Zip file reading the given FileStream

public ZipFile(FileStream);

Opens a Zip file reading the given Stream

public ZipFile(Stream);

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile Constructor (String)

Opens a Zip file with the given name for reading.

[Visual Basic]
Overloads Public Sub New( _
   ByVal name As String _
)
[C#]
public ZipFile(
   string name
);

Exceptions

Exception Type | Condition
 | if the file doesn't contain a valid zip archive.
 | IOException if a i/o error occured.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace | ZipFile Constructor Overload List


ZipFile Constructor (FileStream)

Opens a Zip file reading the given FileStream

[Visual Basic]
Overloads Public Sub New( _
   ByVal file As System.IO.FileStream _
)
[C#]
public ZipFile(
   FileStream file
);

Exceptions

Exception Type | Condition
 | if the file doesn't contain a valid zip archive.
 | IOException if a i/o error occured.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace | ZipFile Constructor Overload List


ZipFile Constructor (Stream)

Opens a Zip file reading the given Stream

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseStream As System.IO.Stream _
)
[C#]
public ZipFile(
   Stream baseStream
);

Exceptions

Exception Type | Condition
 | if the file doesn't contain a valid zip archive.
 | IOException if a i/o error occured.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace | ZipFile Constructor Overload List


ZipFile Properties

The properties of the ZipFile class are listed below. For a complete list of ZipFile class members, see the ZipFile Members topic.

Public Instance Properties

Name | Returns the name of this zip file.
Size | Returns the number of entries in this zip file.

See Also

ZipFile Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.Name Property

Returns the name of this zip file.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.Size Property

Returns the number of entries in this zip file.

[Visual Basic]
Public ReadOnly Property Size As Integer
[C#]
public int Size {get;}

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile Methods

The methods of the ZipFile class are listed below. For a complete list of ZipFile class members, see the ZipFile Members topic.

Public Instance Methods

Close | Closes the ZipFile. This also closes all input streams given by this class. After this is called, no further method should be called.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetEntry | Searches for a zip entry in this archive with the given name.
GetEnumerator | Returns an IEnumerator of all Zip entries in this Zip file.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetInputStream | Creates an input stream reading the given zip entry as uncompressed data. Normally zip entry should be an entry returned by GetEntry().
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

ZipFile Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.Close Method

Closes the ZipFile. This also closes all input streams given by this class. After this is called, no further method should be called.

[Visual Basic]
Public Sub Close()
[C#]
public void Close();

Exceptions

Exception Type | Condition
 | if a i/o error occured.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.GetEntry Method

Searches for a zip entry in this archive with the given name.

[Visual Basic]
Public Function GetEntry( _
   ByVal name As String _
) As ICSharpCode.SharpZipLib.Zip.ZipEntry
[C#]
public ZipEntry GetEntry(
   string name
);

Parameters

name

the name. May contain directory components separated by slashes ('/').

Return Value

the zip entry, or null if no entry with that name exists.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.GetEnumerator Method

Returns an IEnumerator of all Zip entries in this Zip file.

[Visual Basic]
NotOverridable Public Function GetEnumerator() As System.Collections.IEnumerator
[C#]
public final IEnumerator GetEnumerator();

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipFile.GetInputStream Method

Creates an input stream reading the given zip entry as uncompressed data. Normally zip entry should be an entry returned by GetEntry().

[Visual Basic]
Public Function GetInputStream( _
   ByVal entry As ICSharpCode.SharpZipLib.Zip.ZipEntry _
) As System.IO.Stream
[C#]
public Stream GetInputStream(
   ZipEntry entry
);

Return Value

the input stream.

Exceptions

Exception Type | Condition
 | if the Zip archive is malformed.
 | if a i/o error occured.

See Also

ZipFile Class | ZipFile Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Class

This is a FilterInputStream that reads the files baseInputStream an zip archive one after another. It has a special method to get the zip entry of the next file. The zip entry contains information about the file name size, compressed size, CRC, etc. It includes support for STORED and DEFLATED entries. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see ZipInputStream Members.

System.Object
MarshalByRefObject
Stream
InflaterInputStream
ZipInputStream

[Visual Basic]
Public Class ZipInputStream
   Inherits InflaterInputStream
   Implements IDisposable
[C#]
public class ZipInputStream : InflaterInputStream, IDisposable

Example

This sample shows how to read a zip file

            using System;
            using System.Text;
            using System.IO;

            using NZlib.Zip;

            class MainClass
            {
                public static void Main(string[] args)
                {
                    ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]));

                    ZipEntry theEntry;
                    while ((theEntry = s.GetNextEntry()) != null) {
                        Console.WriteLine("File " + theEntry.Name);
                        int size = 2048;
                        byte[] data = new byte[2048];

                        Console.Write("Show contents (y/n) ?");
                        if (Console.ReadLine() == "y") {
                            while (true) {
                                size = s.Read(data, 0, data.Length);
                                if (size > 0) {
                                    Console.Write(new ASCIIEncoding().GetString(data, 0, size));
                                } else {
                                    break;
                                }
                            }
                        }
                        Console.WriteLine();
                    }
                    s.Close();
                }
            }

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Members

Public Instance Constructors

ZipInputStream Constructor Creates a new Zip input stream, reading a zip archive.

Public Instance Properties

Available |
CanRead (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanSeek (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanWrite (inherited from InflaterInputStream) | I needed to implement the abstract member.
Length (inherited from InflaterInputStream) | I needed to implement the abstract member.
Position (inherited from InflaterInputStream) | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the zip file.
CloseEntry | Closes the current zip entry and moves to the next one.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush (inherited from InflaterInputStream) | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetNextEntry | Open the next entry from the zip archive, and return its description. If the previous entry wasn't closed, this method will close it.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Reads a block of bytes from the current zip entry.
ReadByte | Reads a byte from the current zip entry.
Seek (inherited from InflaterInputStream) | I needed to implement the abstract member.
SetLength (inherited from InflaterInputStream) | I needed to implement the abstract member.
Skip (inherited from InflaterInputStream) | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write (inherited from InflaterInputStream) | I needed to implement the abstract member.
WriteByte (inherited from InflaterInputStream) | I needed to implement the abstract member.

Protected Instance Fields

baseInputStream
buf
inf
len

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill (inherited from InflaterInputStream) | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

ZipInputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Constructor

Creates a new Zip input stream, reading a zip archive.

[Visual Basic]
Public Sub New( _
   ByVal baseInputStream As System.IO.Stream _
)
[C#]
public ZipInputStream(
   Stream baseInputStream
);

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Fields

The fields of the ZipInputStream class are listed below. For a complete list of ZipInputStream class members, see the ZipInputStream Members topic.

Protected Instance Fields

baseInputStream
buf
inf
len

See Also

ZipInputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.baseInputStream Field

[Visual Basic]
Protected baseInputStream As System.IO.Stream
[C#]
protected Stream baseInputStream;

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.inf Field

[Visual Basic]
Protected inf As ICSharpCode.SharpZipLib.Zip.Compression.Inflater
[C#]
protected Inflater inf;

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.len Field

[Visual Basic]
Protected len As Integer
[C#]
protected int len;

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Properties

The properties of the ZipInputStream class are listed below. For a complete list of ZipInputStream class members, see the ZipInputStream Members topic.

Public Instance Properties

Available |
CanRead (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanSeek (inherited from InflaterInputStream) | I needed to implement the abstract member.
CanWrite (inherited from InflaterInputStream) | I needed to implement the abstract member.
Length (inherited from InflaterInputStream) | I needed to implement the abstract member.
Position (inherited from InflaterInputStream) | I needed to implement the abstract member.

See Also

ZipInputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.Available Property

[Visual Basic]
Overrides Public ReadOnly Property Available As Integer
[C#]
public int Available {override get;}

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream Methods

The methods of the ZipInputStream class are listed below. For a complete list of ZipInputStream class members, see the ZipInputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the zip file.
CloseEntry | Closes the current zip entry and moves to the next one.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush (inherited from InflaterInputStream) | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetNextEntry | Open the next entry from the zip archive, and return its description. If the previous entry wasn't closed, this method will close it.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Reads a block of bytes from the current zip entry.
ReadByte | Reads a byte from the current zip entry.
Seek (inherited from InflaterInputStream) | I needed to implement the abstract member.
SetLength (inherited from InflaterInputStream) | I needed to implement the abstract member.
Skip (inherited from InflaterInputStream) | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write (inherited from InflaterInputStream) | I needed to implement the abstract member.
WriteByte (inherited from InflaterInputStream) | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill (inherited from InflaterInputStream) | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

ZipInputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.Close Method

Closes the zip file.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

Exceptions

Exception Type | Condition
 | if a i/o error occured.

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.CloseEntry Method

Closes the current zip entry and moves to the next one.

[Visual Basic]
Public Sub CloseEntry()
[C#]
public void CloseEntry();

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.GetNextEntry Method

Open the next entry from the zip archive, and return its description. If the previous entry wasn't closed, this method will close it.

[Visual Basic]
Public Function GetNextEntry() As ICSharpCode.SharpZipLib.Zip.ZipEntry
[C#]
public ZipEntry GetNextEntry();

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.Read Method

Reads a block of bytes from the current zip entry.

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

Return Value

the number of bytes read (may be smaller, even before EOF), or -1 on EOF.

Exceptions

Exception Type | Condition
 | IOException if a i/o error occured. ZipException if the deflated stream is corrupted.

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipInputStream.ReadByte Method

Reads a byte from the current zip entry.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

Return Value

the byte or -1 on EOF.

Exceptions

Exception Type | Condition
 | ZipException if the deflated stream is corrupted.
 | IOException if a i/o error occured.

See Also

ZipInputStream Class | ZipInputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream Class

This is a FilterOutputStream that writes the files into a zip archive one after another. It has a special method to start a new zip entry. The zip entries contains information about the file name size, compressed size, CRC, etc. It includes support for STORED and DEFLATED entries. This class is not thread safe. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see ZipOutputStream Members.

System.Object
MarshalByRefObject
Stream
DeflaterOutputStream
ZipOutputStream

[Visual Basic]
Public Class ZipOutputStream
   Inherits DeflaterOutputStream
   Implements IDisposable
[C#]
public class ZipOutputStream : DeflaterOutputStream, IDisposable

Example

This sample shows how to create a zip file

            using System;
            using System.IO;

            using NZlib.Zip;

            class MainClass
            {
                public static void Main(string[] args)
                {
                    string[] filenames = Directory.GetFiles(args[0]);

                    ZipOutputStream s = new ZipOutputStream(File.Create(args[1]));

                    s.SetLevel(5); // 0 - store only to 9 - means best compression

                    foreach (string file in filenames) {
                        FileStream fs = File.OpenRead(file);

                        byte[] buffer = new byte[fs.Length];
                        fs.Read(buffer, 0, buffer.Length);

                        ZipEntry entry = new ZipEntry(file);

                        s.PutNextEntry(entry);

                        s.Write(buffer, 0, buffer.Length);

                    }

                    s.Finish();
                    s.Close();
                }
            }

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip Namespace

Assembly: SharpZipLib.dll

See Also

ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream Members

Public Static (Shared) Fields

DEFLATED | Compression method. This method uses the Deflater.
STORED | Compression method. This method doesn't compress at all.

Public Instance Constructors

ZipOutputStream Constructor Creates a new Zip output stream, writing a zip archive.

Public Instance Properties

CanRead (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
CanSeek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
CanWrite (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Length (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Position (inherited from DeflaterOutputStream) | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close (inherited from DeflaterOutputStream) | Calls finish () and closes the stream.
CloseEntry | Closes the current entry.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the stream. This will write the central directory at the end of the zip file and flush the stream.
Flush (inherited from DeflaterOutputStream) | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
PutNextEntry | Starts a new Zip entry. It automatically closes the previous entry if present. If the compression method is stored, the entry must have a valid size and crc, otherwise all elements (except name) are optional, but must be correct if present. If the time is not set in the entry, the current time is used.
Read (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ReadByte (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Seek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetComment | Set the zip file comment.
SetLength (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetLevel | Sets default compression level. The new level will be activated immediately.
SetMethod | Sets default compression method. If the Zip entry specifies another method its method takes precedence.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes the given buffer to the current entry.
WriteByte (inherited from DeflaterOutputStream) | Writes a single byte to the compressed output stream.

Protected Instance Fields

baseOutputStream
buf
def

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate (inherited from DeflaterOutputStream) Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

ZipOutputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream Constructor

Creates a new Zip output stream, writing a zip archive.

[Visual Basic]
Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream _
)
[C#]
public ZipOutputStream(
   Stream baseOutputStream
);

Parameters

baseOutputStream

the output stream to which the zip archive is written.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream Fields

The fields of the ZipOutputStream class are listed below. For a complete list of ZipOutputStream class members, see the ZipOutputStream Members topic.

Public Static (Shared) Fields

DEFLATED | Compression method. This method uses the Deflater.
STORED | Compression method. This method doesn't compress at all.

Protected Instance Fields

baseOutputStream
buf
def

See Also

ZipOutputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.baseOutputStream Field

[Visual Basic]
Protected baseOutputStream As System.IO.Stream
[C#]
protected Stream baseOutputStream;

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.def Field

[Visual Basic]
Protected def As ICSharpCode.SharpZipLib.Zip.Compression.Deflater
[C#]
protected Deflater def;

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.DEFLATED Field

Compression method. This method uses the Deflater.

[Visual Basic]
Public Shared DEFLATED As Integer
[C#]
public static int DEFLATED;

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.STORED Field

Compression method. This method doesn't compress at all.

[Visual Basic]
Public Shared STORED As Integer
[C#]
public static int STORED;

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream Methods

The methods of the ZipOutputStream class are listed below. For a complete list of ZipOutputStream class members, see the ZipOutputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close (inherited from DeflaterOutputStream) | Calls finish () and closes the stream.
CloseEntry | Closes the current entry.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the stream. This will write the central directory at the end of the zip file and flush the stream.
Flush (inherited from DeflaterOutputStream) | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
PutNextEntry | Starts a new Zip entry. It automatically closes the previous entry if present. If the compression method is stored, the entry must have a valid size and crc, otherwise all elements (except name) are optional, but must be correct if present. If the time is not set in the entry, the current time is used.
Read (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
ReadByte (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
Seek (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetComment | Set the zip file comment.
SetLength (inherited from DeflaterOutputStream) | I needed to implement the abstract member.
SetLevel | Sets default compression level. The new level will be activated immediately.
SetMethod | Sets default compression method. If the Zip entry specifies another method its method takes precedence.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes the given buffer to the current entry.
WriteByte (inherited from DeflaterOutputStream) | Writes a single byte to the compressed output stream.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate (inherited from DeflaterOutputStream) Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

ZipOutputStream Class | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.CloseEntry Method

Closes the current entry.

[Visual Basic]
Public Sub CloseEntry()
[C#]
public void CloseEntry();

Exceptions

Exception Type | Condition
System.IO.IOException | if an I/O error occured.
System.InvalidOperationException | if no entry is active.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.Finish Method

Finishes the stream. This will write the central directory at the end of the zip file and flush the stream.

[Visual Basic]
Overrides Public Sub Finish()
[C#]
public override void Finish();

Exceptions

Exception Type | Condition
System.IO.IOException | if an I/O error occured.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.PutNextEntry Method

Starts a new Zip entry. It automatically closes the previous entry if present. If the compression method is stored, the entry must have a valid size and crc, otherwise all elements (except name) are optional, but must be correct if present. If the time is not set in the entry, the current time is used.

[Visual Basic]
Public Sub PutNextEntry( _
   ByVal entry As ICSharpCode.SharpZipLib.Zip.ZipEntry _
)
[C#]
public void PutNextEntry(
   ZipEntry entry
);

Parameters

entry

the entry.

Exceptions

Exception Type | Condition
System.IO.IOException | if an I/O error occured.
System.InvalidOperationException | if stream was finished

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.SetComment Method

Set the zip file comment.

[Visual Basic]
Public Sub SetComment( _
   ByVal comment As String _
)
[C#]
public void SetComment(
   string comment
);

Parameters

comment

the comment.

Exceptions

Exception Type | Condition
 | if UTF8 encoding of comment is longer than 0xffff bytes.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.SetLevel Method

Sets default compression level. The new level will be activated immediately.

[Visual Basic]
Public Sub SetLevel( _
   ByVal level As Integer _
)
[C#]
public void SetLevel(
   int level
);

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if level is not supported.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.SetMethod Method

Sets default compression method. If the Zip entry specifies another method its method takes precedence.

[Visual Basic]
Public Sub SetMethod( _
   ByVal method As Integer _
)
[C#]
public void SetMethod(
   int method
);

Parameters

method

the method.

Exceptions

Exception Type | Condition
 | if method is not supported.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ZipOutputStream.Write Method

Writes the given buffer to the current entry.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public override void Write(
   byte[] b,
   int off,
   int len
);

Exceptions

Exception Type | Condition
System.IO.IOException | if an I/O error occured.
System.InvalidOperationException | if no entry is active.

See Also

ZipOutputStream Class | ZipOutputStream Members | ICSharpCode.SharpZipLib.Zip Namespace


ICSharpCode.SharpZipLib.Zip.Compression

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip.Compression Namespace

Namespace hierarchy

Classes

Class | Description
Deflater | This is the Deflater class. The deflater class compresses input with the deflate algorithm described in RFC 1951. It has several compression levels and three different strategies described below. This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput. author of the original java version : Jochen Hoenicke
DeflaterConstants | This class contains constants used for the deflater.
DeflaterEngine
DeflaterHuffman | This is the DeflaterHuffman class. This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput. author of the original java version : Jochen Hoenicke
DeflaterHuffman.Tree
DeflaterPending | This class stores the pending output of the Deflater. author of the original java version : Jochen Hoenicke
Inflater Inflater is used to decompress data that has been compressed according to the "deflate" standard described in rfc1950. The usage is as following. First you have to set some input with
setInput()
, then inflate() it. If inflate doesn't inflate any bytes there may be three reasons:
  • needsInput() returns true because the input buffer is empty. You have to provide more input with
    setInput()
    . NOTE: needsInput() also returns true when, the stream is finished.
  • needsDictionary() returns true, you have to provide a preset dictionary with
    setDictionary()
    .
  • finished() returns true, the inflater has finished.
Once the first output byte is produced, a dictionary will not be needed at a later stage. author of the original java version : John Leuner, Jochen Hoenicke
InflaterHuffmanTree
PendingBuffer | This class is general purpose class for writing data to a buffer. It allows you to write bits as well as bytes Based on DeflaterPending.java author of the original java version : Jochen Hoenicke

Enumerations

Enumeration | Description
DeflateStrategy |


Deflater Class

This is the Deflater class. The deflater class compresses input with the deflate algorithm described in RFC 1951. It has several compression levels and three different strategies described below. This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see Deflater Members.

System.Object
Deflater

[Visual Basic]
Public Class Deflater
[C#]
public class Deflater

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater Members

Public Static (Shared) Fields

BEST_COMPRESSION | The best and slowest compression level. This tries to find very long and distant string repetitions.
BEST_SPEED | The worst but fastest compression level.
DEFAULT_COMPRESSION | The default compression level.
DEFLATED | The compression method. This is the only method supported so far. There is no need to use this constant at all.
NO_COMPRESSION | This level won't compress at all but output uncompressed blocks.

Public Instance Constructors

Deflater Overloaded. Initialize a new instance of the Deflater class.

Public Instance Properties

Adler | Gets the current adler checksum of the data that was processed so far.
IsFinished | Returns true if the stream was finished and no more output bytes are available.
IsNeedingInput | Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method can also return true when the stream was finished.
TotalIn | Gets the number of input bytes processed so far.
TotalOut | Gets the number of output bytes so far.

Public Instance Methods

Deflate | Overloaded. Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the deflater with the current input block. It is an error to give more input after this method was called. This method must be called to force all bytes to be flushed.
Flush | Flushes the current input block. Further calls to deflate() will produce enough output to inflate everything in the current input block. This is not part of Sun's JDK so I have made it package private. It is used by DeflaterOutputStream to implement flush().
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the deflater. The deflater acts afterwards as if it was just created with the same compression level and strategy as it had before.
SetDictionary Overloaded. Sets the dictionary which should be used in the deflate process. This call is equivalent to
setDictionary(dict, 0, dict.Length)
.
SetInput Overloaded. Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to
setInput(input, 0, input.length)
.
SetLevel | Sets the compression level. There is no guarantee of the exact position of the change, but if you call this when needsInput is true the change of compression level will occur somewhere near before the end of the so far given input.
SetStrategy | Sets the compression strategy. Strategy is one of DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact position where the strategy is changed, the same as for setLevel() applies.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Deflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater Constructor

An NDoc Documented Class Library

Deflater

Creates a new deflater with default compression level.

Overload List

Creates a new deflater with default compression level.

public Deflater();

Creates a new deflater with given compression level.

public Deflater(int);

Creates a new deflater with given compression level.

public Deflater(int,bool);

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater Constructor ()

Creates a new deflater with default compression level.

[Visual Basic]
Overloads Public Sub New()
[C#]
public Deflater();

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater Constructor Overload List


Deflater Constructor (Int32)

Creates a new deflater with given compression level.

[Visual Basic]
Overloads Public Sub New( _
   ByVal lvl As Integer _
)
[C#]
public Deflater(
   int lvl
);

Parameters

lvl

the compression level, a value between NO_COMPRESSION and BEST_COMPRESSION, or DEFAULT_COMPRESSION.

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if lvl is out of range.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater Constructor Overload List


Deflater Constructor (Int32, Boolean)

Creates a new deflater with given compression level.

[Visual Basic]
Overloads Public Sub New( _
   ByVal lvl As Integer, _
   ByVal nowrap As Boolean _
)
[C#]
public Deflater(
   int lvl,
   bool nowrap
);

Parameters

lvl

the compression level, a value between NO_COMPRESSION and BEST_COMPRESSION.

nowrap

true, if we should suppress the deflate header at the beginning and the adler checksum at the end of the output. This is useful for the GZIP format.

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if lvl is out of range.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater Constructor Overload List


Deflater Fields

The fields of the Deflater class are listed below. For a complete list of Deflater class members, see the Deflater Members topic.

Public Static (Shared) Fields

BEST_COMPRESSION | The best and slowest compression level. This tries to find very long and distant string repetitions.
BEST_SPEED | The worst but fastest compression level.
DEFAULT_COMPRESSION | The default compression level.
DEFLATED | The compression method. This is the only method supported so far. There is no need to use this constant at all.
NO_COMPRESSION | This level won't compress at all but output uncompressed blocks.

See Also

Deflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.BEST_COMPRESSION Field

The best and slowest compression level. This tries to find very long and distant string repetitions.

[Visual Basic]
Public Shared BEST_COMPRESSION As Integer
[C#]
public static int BEST_COMPRESSION;

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.BEST_SPEED Field

The worst but fastest compression level.

[Visual Basic]
Public Shared BEST_SPEED As Integer
[C#]
public static int BEST_SPEED;

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.DEFAULT_COMPRESSION Field

The default compression level.

[Visual Basic]
Public Shared DEFAULT_COMPRESSION As Integer
[C#]
public static int DEFAULT_COMPRESSION;

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.DEFLATED Field

The compression method. This is the only method supported so far. There is no need to use this constant at all.

[Visual Basic]
Public Shared DEFLATED As Integer
[C#]
public static int DEFLATED;

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.NO_COMPRESSION Field

This level won't compress at all but output uncompressed blocks.

[Visual Basic]
Public Shared NO_COMPRESSION As Integer
[C#]
public static int NO_COMPRESSION;

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater Properties

The properties of the Deflater class are listed below. For a complete list of Deflater class members, see the Deflater Members topic.

Public Instance Properties

Adler | Gets the current adler checksum of the data that was processed so far.
IsFinished | Returns true if the stream was finished and no more output bytes are available.
IsNeedingInput | Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method can also return true when the stream was finished.
TotalIn | Gets the number of input bytes processed so far.
TotalOut | Gets the number of output bytes so far.

See Also

Deflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.Adler Property

Gets the current adler checksum of the data that was processed so far.

[Visual Basic]
Public ReadOnly Property Adler As Integer
[C#]
public int Adler {get;}

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.IsFinished Property

Returns true if the stream was finished and no more output bytes are available.

[Visual Basic]
Public ReadOnly Property IsFinished As Boolean
[C#]
public bool IsFinished {get;}

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.IsNeedingInput Property

Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method can also return true when the stream was finished.

[Visual Basic]
Public ReadOnly Property IsNeedingInput As Boolean
[C#]
public bool IsNeedingInput {get;}

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.TotalIn Property

Gets the number of input bytes processed so far.

[Visual Basic]
Public ReadOnly Property TotalIn As Integer
[C#]
public int TotalIn {get;}

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.TotalOut Property

Gets the number of output bytes so far.

[Visual Basic]
Public ReadOnly Property TotalOut As Integer
[C#]
public int TotalOut {get;}

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater Methods

The methods of the Deflater class are listed below. For a complete list of Deflater class members, see the Deflater Members topic.

Public Instance Methods

Deflate | Overloaded. Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the deflater with the current input block. It is an error to give more input after this method was called. This method must be called to force all bytes to be flushed.
Flush | Flushes the current input block. Further calls to deflate() will produce enough output to inflate everything in the current input block. This is not part of Sun's JDK so I have made it package private. It is used by DeflaterOutputStream to implement flush().
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset | Resets the deflater. The deflater acts afterwards as if it was just created with the same compression level and strategy as it had before.
SetDictionary Overloaded. Sets the dictionary which should be used in the deflate process. This call is equivalent to
setDictionary(dict, 0, dict.Length)
.
SetInput Overloaded. Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to
setInput(input, 0, input.length)
.
SetLevel | Sets the compression level. There is no guarantee of the exact position of the change, but if you call this when needsInput is true the change of compression level will occur somewhere near before the end of the so far given input.
SetStrategy | Sets the compression strategy. Strategy is one of DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact position where the strategy is changed, the same as for setLevel() applies.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Deflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflate Method

An NDoc Documented Class Library

Deflater.Deflate

Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.

Overload List

Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.

public int Deflate(byte[]);

Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.

public int Deflate(byte[],int,int);

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.Deflate Method (Byte[])

Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.

[Visual Basic]
Overloads Public Function Deflate( _
   ByVal output As Byte() _
) As Integer
[C#]
public int Deflate(
   byte[] output
);

Parameters

output

the buffer where to write the compressed data.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.Deflate Overload List


Deflater.Deflate Method (Byte[], Int32, Int32)

Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.

[Visual Basic]
Overloads Public Function Deflate( _
   ByVal output As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public int Deflate(
   byte[] output,
   int offset,
   int length
);

Parameters

output

the buffer where to write the compressed data.

offset

the offset into the output array.

length

the maximum number of bytes that may be written.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if end() was called.
System.ArgumentOutOfRangeException | if offset and/or length don't match the array length.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.Deflate Overload List


Deflater.Finish Method

Finishes the deflater with the current input block. It is an error to give more input after this method was called. This method must be called to force all bytes to be flushed.

[Visual Basic]
Public Sub Finish()
[C#]
public void Finish();

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.Flush Method

Flushes the current input block. Further calls to deflate() will produce enough output to inflate everything in the current input block. This is not part of Sun's JDK so I have made it package private. It is used by DeflaterOutputStream to implement flush().

[Visual Basic]
Public Sub Flush()
[C#]
public void Flush();

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.Reset Method

Resets the deflater. The deflater acts afterwards as if it was just created with the same compression level and strategy as it had before.

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


SetDictionary Method

An NDoc Documented Class Library

Deflater.SetDictionary

Sets the dictionary which should be used in the deflate process. This call is equivalent to

setDictionary(dict, 0, dict.Length)
.

Overload List

Sets the dictionary which should be used in the deflate process. This call is equivalent to

setDictionary(dict, 0, dict.Length)
.

public void SetDictionary(byte[]);

Sets the dictionary which should be used in the deflate process. The dictionary should be a byte array containing strings that are likely to occur in the data which should be compressed. The dictionary is not stored in the compressed output, only a checksum. To decompress the output you need to supply the same dictionary again.

public void SetDictionary(byte[],int,int);

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.SetDictionary Method (Byte[])

Sets the dictionary which should be used in the deflate process. This call is equivalent to

setDictionary(dict, 0, dict.Length)
.

[Visual Basic]
Overloads Public Sub SetDictionary( _
   ByVal dict As Byte() _
)
[C#]
public void SetDictionary(
   byte[] dict
);

Parameters

dict

the dictionary.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if setInput () or deflate () were already called or another dictionary was already set.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.SetDictionary Overload List


Deflater.SetDictionary Method (Byte[], Int32, Int32)

Sets the dictionary which should be used in the deflate process. The dictionary should be a byte array containing strings that are likely to occur in the data which should be compressed. The dictionary is not stored in the compressed output, only a checksum. To decompress the output you need to supply the same dictionary again.

[Visual Basic]
Overloads Public Sub SetDictionary( _
   ByVal dict As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
)
[C#]
public void SetDictionary(
   byte[] dict,
   int offset,
   int length
);

Parameters

dict

the dictionary.

offset

an offset into the dictionary.

length

the length of the dictionary.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if setInput () or deflate () were already called or another dictionary was already set.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.SetDictionary Overload List


SetInput Method

An NDoc Documented Class Library

Deflater.SetInput

Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to

setInput(input, 0, input.length)
.

Overload List

Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to

setInput(input, 0, input.length)
.

public void SetInput(byte[]);

Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. The given byte array should not be changed, before needsInput() returns true again.

public void SetInput(byte[],int,int);

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.SetInput Method (Byte[])

Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to

setInput(input, 0, input.length)
.

[Visual Basic]
Overloads Public Sub SetInput( _
   ByVal input As Byte() _
)
[C#]
public void SetInput(
   byte[] input
);

Parameters

input

the buffer containing the input data.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if the buffer was finished() or ended().

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.SetInput Overload List


Deflater.SetInput Method (Byte[], Int32, Int32)

Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. The given byte array should not be changed, before needsInput() returns true again.

[Visual Basic]
Overloads Public Sub SetInput( _
   ByVal input As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public void SetInput(
   byte[] input,
   int off,
   int len
);

Parameters

input

the buffer containing the input data.

off

the start of the data.

len

the length of the data.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if the buffer was finished() or ended() or if previous input is still pending.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Deflater.SetInput Overload List


Deflater.SetLevel Method

Sets the compression level. There is no guarantee of the exact position of the change, but if you call this when needsInput is true the change of compression level will occur somewhere near before the end of the so far given input.

[Visual Basic]
Public Sub SetLevel( _
   ByVal lvl As Integer _
)
[C#]
public void SetLevel(
   int lvl
);

Parameters

lvl

the new compression level.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Deflater.SetStrategy Method

Sets the compression strategy. Strategy is one of DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact position where the strategy is changed, the same as for setLevel() applies.

[Visual Basic]
Public Sub SetStrategy( _
   ByVal stgy As ICSharpCode.SharpZipLib.Zip.Compression.DeflateStrategy _
)
[C#]
public void SetStrategy(
   DeflateStrategy stgy
);

Parameters

stgy

the new compression strategy.

See Also

Deflater Class | Deflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants Class

This class contains constants used for the deflater.

For a list of all members of this type, see DeflaterConstants Members.

System.Object
DeflaterConstants

[Visual Basic]
Public Class DeflaterConstants
[C#]
public class DeflaterConstants

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants Members

Public Static (Shared) Fields

COMPR_FUNC
DEBUGGING
DEFAULT_MEM_LEVEL
DEFLATE_FAST
DEFLATE_SLOW
DEFLATE_STORED
DYN_TREES
GOOD_LENGTH
HASH_BITS
HASH_MASK
HASH_SHIFT
HASH_SIZE
MAX_BLOCK_SIZE
MAX_CHAIN
MAX_DIST
MAX_LAZY
MAX_MATCH
MAX_WBITS
MIN_LOOKAHEAD
MIN_MATCH
NICE_LENGTH
PENDING_BUF_SIZE
PRESET_DICT
STATIC_TREES
STORED_BLOCK
WMASK
WSIZE

Public Instance Constructors

DeflaterConstants Constructor

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterConstants Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants Constructor

[Visual Basic]
Public Sub New()
[C#]
public DeflaterConstants();

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants Fields

The fields of the DeflaterConstants class are listed below. For a complete list of DeflaterConstants class members, see the DeflaterConstants Members topic.

Public Static (Shared) Fields

COMPR_FUNC
DEBUGGING
DEFAULT_MEM_LEVEL
DEFLATE_FAST
DEFLATE_SLOW
DEFLATE_STORED
DYN_TREES
GOOD_LENGTH
HASH_BITS
HASH_MASK
HASH_SHIFT
HASH_SIZE
MAX_BLOCK_SIZE
MAX_CHAIN
MAX_DIST
MAX_LAZY
MAX_MATCH
MAX_WBITS
MIN_LOOKAHEAD
MIN_MATCH
NICE_LENGTH
PENDING_BUF_SIZE
PRESET_DICT
STATIC_TREES
STORED_BLOCK
WMASK
WSIZE

See Also

DeflaterConstants Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.COMPR_FUNC Field

[Visual Basic]
Public Shared COMPR_FUNC As Integer()
[C#]
public static int[] COMPR_FUNC;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DEBUGGING Field

[Visual Basic]
Public Shared DEBUGGING As Boolean
[C#]
public static bool DEBUGGING;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DEFAULT_MEM_LEVEL Field

[Visual Basic]
Public Shared DEFAULT_MEM_LEVEL As Integer
[C#]
public static int DEFAULT_MEM_LEVEL;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DEFLATE_FAST Field

[Visual Basic]
Public Shared DEFLATE_FAST As Integer
[C#]
public static int DEFLATE_FAST;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DEFLATE_SLOW Field

[Visual Basic]
Public Shared DEFLATE_SLOW As Integer
[C#]
public static int DEFLATE_SLOW;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DEFLATE_STORED Field

[Visual Basic]
Public Shared DEFLATE_STORED As Integer
[C#]
public static int DEFLATE_STORED;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.DYN_TREES Field

[Visual Basic]
Public Shared DYN_TREES As Integer
[C#]
public static int DYN_TREES;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.GOOD_LENGTH Field

[Visual Basic]
Public Shared GOOD_LENGTH As Integer()
[C#]
public static int[] GOOD_LENGTH;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.HASH_BITS Field

[Visual Basic]
Public Shared HASH_BITS As Integer
[C#]
public static int HASH_BITS;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.HASH_MASK Field

[Visual Basic]
Public Shared HASH_MASK As Integer
[C#]
public static int HASH_MASK;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.HASH_SHIFT Field

[Visual Basic]
Public Shared HASH_SHIFT As Integer
[C#]
public static int HASH_SHIFT;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.HASH_SIZE Field

[Visual Basic]
Public Shared HASH_SIZE As Integer
[C#]
public static int HASH_SIZE;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_BLOCK_SIZE Field

[Visual Basic]
Public Shared MAX_BLOCK_SIZE As Integer
[C#]
public static int MAX_BLOCK_SIZE;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_CHAIN Field

[Visual Basic]
Public Shared MAX_CHAIN As Integer()
[C#]
public static int[] MAX_CHAIN;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_DIST Field

[Visual Basic]
Public Shared MAX_DIST As Integer
[C#]
public static int MAX_DIST;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_LAZY Field

[Visual Basic]
Public Shared MAX_LAZY As Integer()
[C#]
public static int[] MAX_LAZY;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_MATCH Field

[Visual Basic]
Public Shared MAX_MATCH As Integer
[C#]
public static int MAX_MATCH;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MAX_WBITS Field

[Visual Basic]
Public Shared MAX_WBITS As Integer
[C#]
public static int MAX_WBITS;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MIN_LOOKAHEAD Field

[Visual Basic]
Public Shared MIN_LOOKAHEAD As Integer
[C#]
public static int MIN_LOOKAHEAD;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.MIN_MATCH Field

[Visual Basic]
Public Shared MIN_MATCH As Integer
[C#]
public static int MIN_MATCH;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.NICE_LENGTH Field

[Visual Basic]
Public Shared NICE_LENGTH As Integer()
[C#]
public static int[] NICE_LENGTH;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.PENDING_BUF_SIZE Field

[Visual Basic]
Public Shared PENDING_BUF_SIZE As Integer
[C#]
public static int PENDING_BUF_SIZE;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.PRESET_DICT Field

[Visual Basic]
Public Shared PRESET_DICT As Integer
[C#]
public static int PRESET_DICT;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.STATIC_TREES Field

[Visual Basic]
Public Shared STATIC_TREES As Integer
[C#]
public static int STATIC_TREES;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.STORED_BLOCK Field

[Visual Basic]
Public Shared STORED_BLOCK As Integer
[C#]
public static int STORED_BLOCK;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.WMASK Field

[Visual Basic]
Public Shared WMASK As Integer
[C#]
public static int WMASK;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterConstants.WSIZE Field

[Visual Basic]
Public Shared WSIZE As Integer
[C#]
public static int WSIZE;

See Also

DeflaterConstants Class | DeflaterConstants Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine Class

For a list of all members of this type, see DeflaterEngine Members.

System.Object
DeflaterConstants
DeflaterEngine

[Visual Basic]
Public Class DeflaterEngine
   Inherits DeflaterConstants
[C#]
public class DeflaterEngine : DeflaterConstants

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine Members

Public Instance Constructors

DeflaterEngine Constructor

Public Instance Properties

Adler
Strategy
TotalIn

Public Instance Methods

Deflate |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
FillWindow |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
NeedsInput |
Reset |
ResetAdler |
SetDictionary |
SetInput |
SetLevel |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterEngine Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine Constructor

[Visual Basic]
Public Sub New( _
   ByVal pending As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterPending _
)
[C#]
public DeflaterEngine(
   DeflaterPending pending
);

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine Properties

The properties of the DeflaterEngine class are listed below. For a complete list of DeflaterEngine class members, see the DeflaterEngine Members topic.

Public Instance Properties

Adler
Strategy
TotalIn

See Also

DeflaterEngine Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.Adler Property

[Visual Basic]
Public ReadOnly Property Adler As Integer
[C#]
public int Adler {get;}

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.Strategy Property

[Visual Basic]
Public Property Strategy As ICSharpCode.SharpZipLib.Zip.Compression.DeflateStrategy
[C#]
public DeflateStrategy Strategy {get; set;}

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.TotalIn Property

[Visual Basic]
Public ReadOnly Property TotalIn As Integer
[C#]
public int TotalIn {get;}

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine Methods

The methods of the DeflaterEngine class are listed below. For a complete list of DeflaterEngine class members, see the DeflaterEngine Members topic.

Public Instance Methods

Deflate |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
FillWindow |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
NeedsInput |
Reset |
ResetAdler |
SetDictionary |
SetInput |
SetLevel |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterEngine Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.Deflate Method

[Visual Basic]
Public Function Deflate( _
   ByVal flush As Boolean, _
   ByVal finish As Boolean _
) As Boolean
[C#]
public bool Deflate(
   bool flush,
   bool finish
);

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.FillWindow Method

[Visual Basic]
Public Sub FillWindow()
[C#]
public void FillWindow();

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.NeedsInput Method

[Visual Basic]
Public Function NeedsInput() As Boolean
[C#]
public bool NeedsInput();

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.ResetAdler Method

[Visual Basic]
Public Sub ResetAdler()
[C#]
public void ResetAdler();

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.SetDictionary Method

[Visual Basic]
Public Sub SetDictionary( _
   ByVal buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
)
[C#]
public void SetDictionary(
   byte[] buffer,
   int offset,
   int length
);

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.SetInput Method

[Visual Basic]
Public Sub SetInput( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public void SetInput(
   byte[] buf,
   int off,
   int len
);

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterEngine.SetLevel Method

[Visual Basic]
Public Sub SetLevel( _
   ByVal lvl As Integer _
)
[C#]
public void SetLevel(
   int lvl
);

See Also

DeflaterEngine Class | DeflaterEngine Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman Class

This is the DeflaterHuffman class. This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see DeflaterHuffman Members.

System.Object
DeflaterHuffman

[Visual Basic]
Public Class DeflaterHuffman
[C#]
public class DeflaterHuffman

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman Members

Public Static (Shared) Methods

BitReverse Reverse the bits of a 16 bit value.

Public Instance Constructors

DeflaterHuffman Constructor

Public Instance Fields

pending

Public Instance Methods

CompressBlock |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
FlushBlock |
FlushStoredBlock |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsFull |
Reset |
SendAllTrees |
TallyDist |
TallyLit |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterHuffman Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman Constructor

[Visual Basic]
Public Sub New( _
   ByVal pending As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterPending _
)
[C#]
public DeflaterHuffman(
   DeflaterPending pending
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman Fields

The fields of the DeflaterHuffman class are listed below. For a complete list of DeflaterHuffman class members, see the DeflaterHuffman Members topic.

Public Instance Fields

pending

See Also

DeflaterHuffman Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.pending Field

[Visual Basic]
Public pending As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterPending
[C#]
public DeflaterPending pending;

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman Methods

The methods of the DeflaterHuffman class are listed below. For a complete list of DeflaterHuffman class members, see the DeflaterHuffman Members topic.

Public Static (Shared) Methods

BitReverse Reverse the bits of a 16 bit value.

Public Instance Methods

CompressBlock |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
FlushBlock |
FlushStoredBlock |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
IsFull |
Reset |
SendAllTrees |
TallyDist |
TallyLit |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterHuffman Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.BitReverse Method

Reverse the bits of a 16 bit value.

[Visual Basic]
Public Shared Function BitReverse( _
   ByVal value As Integer _
) As Short
[C#]
public static short BitReverse(
   int value
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.CompressBlock Method

[Visual Basic]
Public Sub CompressBlock()
[C#]
public void CompressBlock();

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.FlushBlock Method

[Visual Basic]
Public Sub FlushBlock( _
   ByVal stored As Byte(), _
   ByVal stored_offset As Integer, _
   ByVal stored_len As Integer, _
   ByVal lastBlock As Boolean _
)
[C#]
public void FlushBlock(
   byte[] stored,
   int stored_offset,
   int stored_len,
   bool lastBlock
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.FlushStoredBlock Method

[Visual Basic]
Public Sub FlushStoredBlock( _
   ByVal stored As Byte(), _
   ByVal stored_offset As Integer, _
   ByVal stored_len As Integer, _
   ByVal lastBlock As Boolean _
)
[C#]
public void FlushStoredBlock(
   byte[] stored,
   int stored_offset,
   int stored_len,
   bool lastBlock
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.IsFull Method

[Visual Basic]
Public Function IsFull() As Boolean
[C#]
public bool IsFull();

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.SendAllTrees Method

[Visual Basic]
Public Sub SendAllTrees( _
   ByVal blTreeCodes As Integer _
)
[C#]
public void SendAllTrees(
   int blTreeCodes
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.TallyDist Method

[Visual Basic]
Public Function TallyDist( _
   ByVal dist As Integer, _
   ByVal len As Integer _
) As Boolean
[C#]
public bool TallyDist(
   int dist,
   int len
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.TallyLit Method

[Visual Basic]
Public Function TallyLit( _
   ByVal lit As Integer _
) As Boolean
[C#]
public bool TallyLit(
   int lit
);

See Also

DeflaterHuffman Class | DeflaterHuffman Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree Class

For a list of all members of this type, see DeflaterHuffman.Tree Members.

System.Object
DeflaterHuffman.Tree

[Visual Basic]
Public Class DeflaterHuffman.Tree
[C#]
public class DeflaterHuffman.Tree

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree Members

Public Instance Constructors

DeflaterHuffman.Tree Constructor

Public Instance Fields

bl_counts
codes
freqs
length
maxLength
minNumCodes
numCodes

Public Instance Methods

BuildCodes |
BuildTree |
CalcBLFreq |
CheckEmpty |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetEncodedLength |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
SetStaticCodes |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteSymbol |
WriteTree |

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterHuffman.Tree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree Constructor

[Visual Basic]
Public Sub New( _
   ByVal dh As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman, _
   ByVal elems As Integer, _
   ByVal minCodes As Integer, _
   ByVal maxLength As Integer _
)
[C#]
public DeflaterHuffman.Tree(
   DeflaterHuffman dh,
   int elems,
   int minCodes,
   int maxLength
);

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree Fields

The fields of the DeflaterHuffman.Tree class are listed below. For a complete list of DeflaterHuffman.Tree class members, see the DeflaterHuffman.Tree Members topic.

Public Instance Fields

bl_counts
codes
freqs
length
maxLength
minNumCodes
numCodes

See Also

DeflaterHuffman.Tree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.bl_counts Field

[Visual Basic]
Public bl_counts As Integer()
[C#]
public int[] bl_counts;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.codes Field

[Visual Basic]
Public codes As Short()
[C#]
public short[] codes;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.freqs Field

[Visual Basic]
Public freqs As Short()
[C#]
public short[] freqs;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.length Field

[Visual Basic]
Public length As Byte()
[C#]
public byte[] length;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.maxLength Field

[Visual Basic]
Public maxLength As Integer
[C#]
public int maxLength;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.minNumCodes Field

[Visual Basic]
Public minNumCodes As Integer
[C#]
public int minNumCodes;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.numCodes Field

[Visual Basic]
Public numCodes As Integer
[C#]
public int numCodes;

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree Methods

The methods of the DeflaterHuffman.Tree class are listed below. For a complete list of DeflaterHuffman.Tree class members, see the DeflaterHuffman.Tree Members topic.

Public Instance Methods

BuildCodes |
BuildTree |
CalcBLFreq |
CheckEmpty |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetEncodedLength |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
SetStaticCodes |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteSymbol |
WriteTree |

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterHuffman.Tree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.BuildCodes Method

[Visual Basic]
Public Sub BuildCodes()
[C#]
public void BuildCodes();

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.BuildTree Method

[Visual Basic]
Public Sub BuildTree()
[C#]
public void BuildTree();

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.CalcBLFreq Method

[Visual Basic]
Public Sub CalcBLFreq( _
   ByVal blTree As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Tree _
)
[C#]
public void CalcBLFreq(
   Tree blTree
);

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.CheckEmpty Method

[Visual Basic]
Public Sub CheckEmpty()
[C#]
public void CheckEmpty();

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.GetEncodedLength Method

[Visual Basic]
Public Function GetEncodedLength() As Integer
[C#]
public int GetEncodedLength();

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.SetStaticCodes Method

[Visual Basic]
Public Sub SetStaticCodes( _
   ByVal stCodes As Short(), _
   ByVal stLength As Byte() _
)
[C#]
public void SetStaticCodes(
   short[] stCodes,
   byte[] stLength
);

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.WriteSymbol Method

[Visual Basic]
Public Sub WriteSymbol( _
   ByVal code As Integer _
)
[C#]
public void WriteSymbol(
   int code
);

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterHuffman.Tree.WriteTree Method

[Visual Basic]
Public Sub WriteTree( _
   ByVal blTree As ICSharpCode.SharpZipLib.Zip.Compression.DeflaterHuffman.Tree _
)
[C#]
public void WriteTree(
   Tree blTree
);

See Also

DeflaterHuffman.Tree Class | DeflaterHuffman.Tree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterPending Class

This class stores the pending output of the Deflater. author of the original java version : Jochen Hoenicke

For a list of all members of this type, see DeflaterPending Members.

System.Object
PendingBuffer
DeflaterPending

[Visual Basic]
Public Class DeflaterPending
   Inherits PendingBuffer
[C#]
public class DeflaterPending : PendingBuffer

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterPending Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterPending Members

Public Instance Constructors

DeflaterPending Constructor

Public Instance Properties

BitCount (inherited from PendingBuffer)
IsFlushed (inherited from PendingBuffer)

Public Instance Methods

AlignToByte (inherited from PendingBuffer) |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush (inherited from PendingBuffer) | Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset (inherited from PendingBuffer) |
ToByteArray (inherited from PendingBuffer) |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteBits (inherited from PendingBuffer) |
WriteBlock (inherited from PendingBuffer) |
WriteByte (inherited from PendingBuffer) |
WriteInt (inherited from PendingBuffer) |
WriteShort (inherited from PendingBuffer) |
WriteShortMSB (inherited from PendingBuffer) |

Protected Instance Fields

buf

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

DeflaterPending Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterPending Constructor

[Visual Basic]
Public Sub New()
[C#]
public DeflaterPending();

See Also

DeflaterPending Class | DeflaterPending Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterPending Fields

The fields of the DeflaterPending class are listed below. For a complete list of DeflaterPending class members, see the DeflaterPending Members topic.

Protected Instance Fields

buf

See Also

DeflaterPending Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflaterPending.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

DeflaterPending Class | DeflaterPending Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


DeflateStrategy Enumeration

[Visual Basic]
Public Enum DeflateStrategy
[C#]
public enum DeflateStrategy

Members

Member Name | Description
Default |
Filtered |
HuffmanOnly |

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater Class

Inflater is used to decompress data that has been compressed according to the "deflate" standard described in rfc1950. The usage is as following. First you have to set some input with

setInput()
, then inflate() it. If inflate doesn't inflate any bytes there may be three reasons:
  • needsInput() returns true because the input buffer is empty. You have to provide more input with
    setInput()
    . NOTE: needsInput() also returns true when, the stream is finished.
  • needsDictionary() returns true, you have to provide a preset dictionary with
    setDictionary()
    .
  • finished() returns true, the inflater has finished.
Once the first output byte is produced, a dictionary will not be needed at a later stage. author of the original java version : John Leuner, Jochen Hoenicke

For a list of all members of this type, see Inflater Members.

System.Object
Inflater

[Visual Basic]
Public Class Inflater
[C#]
public class Inflater

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater Members

Public Instance Constructors

Inflater Overloaded. Initialize a new instance of the Inflater class.

Public Instance Properties

Adler | Gets the adler checksum. This is either the checksum of all uncompressed bytes returned by inflate(), or if needsDictionary() returns true (and thus no output was yet produced) this is the adler checksum of the expected dictionary.
IsFinished | Returns true, if the inflater has finished. This means, that no input is needed and no output can be produced.
IsNeedingDictionary | Returns true, if a preset dictionary is needed to inflate the input.
IsNeedingInput | Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method also returns true when the stream is finished.
RemainingInput | Gets the number of unprocessed input. Useful, if the end of the stream is reached and you want to further process the bytes after the deflate stream.
TotalIn | Gets the total number of processed compressed input bytes.
TotalOut | Gets the total number of output bytes returned by inflate().

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Inflate | Overloaded. Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.
Reset | Resets the inflater so that a new stream can be decompressed. All pending input and output will be discarded.
SetDictionary | Overloaded. Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.
SetInput | Overloaded. Sets the input. This should only be called, if needsInput() returns true.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Inflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater Constructor

An NDoc Documented Class Library

Inflater

Creates a new inflater.

Overload List

Creates a new inflater.

public Inflater();

Creates a new inflater.

public Inflater(bool);

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater Constructor ()

Creates a new inflater.

[Visual Basic]
Overloads Public Sub New()
[C#]
public Inflater();

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater Constructor Overload List


Inflater Constructor (Boolean)

Creates a new inflater.

[Visual Basic]
Overloads Public Sub New( _
   ByVal nowrap As Boolean _
)
[C#]
public Inflater(
   bool nowrap
);

Parameters

nowrap

true if no header and checksum field appears in the stream. This is used for GZIPed input. For compatibility with Sun JDK you should provide one byte of input more than needed in this case.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater Constructor Overload List


Inflater Properties

The properties of the Inflater class are listed below. For a complete list of Inflater class members, see the Inflater Members topic.

Public Instance Properties

Adler | Gets the adler checksum. This is either the checksum of all uncompressed bytes returned by inflate(), or if needsDictionary() returns true (and thus no output was yet produced) this is the adler checksum of the expected dictionary.
IsFinished | Returns true, if the inflater has finished. This means, that no input is needed and no output can be produced.
IsNeedingDictionary | Returns true, if a preset dictionary is needed to inflate the input.
IsNeedingInput | Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method also returns true when the stream is finished.
RemainingInput | Gets the number of unprocessed input. Useful, if the end of the stream is reached and you want to further process the bytes after the deflate stream.
TotalIn | Gets the total number of processed compressed input bytes.
TotalOut | Gets the total number of output bytes returned by inflate().

See Also

Inflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.Adler Property

Gets the adler checksum. This is either the checksum of all uncompressed bytes returned by inflate(), or if needsDictionary() returns true (and thus no output was yet produced) this is the adler checksum of the expected dictionary.

[Visual Basic]
Public ReadOnly Property Adler As Integer
[C#]
public int Adler {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.IsFinished Property

Returns true, if the inflater has finished. This means, that no input is needed and no output can be produced.

[Visual Basic]
Public ReadOnly Property IsFinished As Boolean
[C#]
public bool IsFinished {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.IsNeedingDictionary Property

Returns true, if a preset dictionary is needed to inflate the input.

[Visual Basic]
Public ReadOnly Property IsNeedingDictionary As Boolean
[C#]
public bool IsNeedingDictionary {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.IsNeedingInput Property

Returns true, if the input buffer is empty. You should then call setInput(). NOTE: This method also returns true when the stream is finished.

[Visual Basic]
Public ReadOnly Property IsNeedingInput As Boolean
[C#]
public bool IsNeedingInput {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.RemainingInput Property

Gets the number of unprocessed input. Useful, if the end of the stream is reached and you want to further process the bytes after the deflate stream.

[Visual Basic]
Public ReadOnly Property RemainingInput As Integer
[C#]
public int RemainingInput {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.TotalIn Property

Gets the total number of processed compressed input bytes.

[Visual Basic]
Public ReadOnly Property TotalIn As Integer
[C#]
public int TotalIn {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.TotalOut Property

Gets the total number of output bytes returned by inflate().

[Visual Basic]
Public ReadOnly Property TotalOut As Integer
[C#]
public int TotalOut {get;}

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater Methods

The methods of the Inflater class are listed below. For a complete list of Inflater class members, see the Inflater Members topic.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Inflate | Overloaded. Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.
Reset | Resets the inflater so that a new stream can be decompressed. All pending input and output will be discarded.
SetDictionary | Overloaded. Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.
SetInput | Overloaded. Sets the input. This should only be called, if needsInput() returns true.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

Inflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflate Method

An NDoc Documented Class Library

Inflater.Inflate

Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.

Overload List

Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.

public int Inflate(byte[]);

Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.

public int Inflate(byte[],int,int);

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.Inflate Method (Byte[])

Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.

[Visual Basic]
Overloads Public Function Inflate( _
   ByVal buf As Byte() _
) As Integer
[C#]
public int Inflate(
   byte[] buf
);

Parameters

buf

the output buffer.

Return Value

the number of bytes written to the buffer, 0 if no further output can be produced.

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if buf has length 0.
System.FormatException | if deflated stream is invalid.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.Inflate Overload List


Inflater.Inflate Method (Byte[], Int32, Int32)

Inflates the compressed stream to the output buffer. If this returns 0, you should check, whether needsDictionary(), needsInput() or finished() returns true, to determine why no further output is produced.

[Visual Basic]
Overloads Public Function Inflate( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public int Inflate(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

the output buffer.

off

the offset into buffer where the output should start.

len

the maximum length of the output.

Return Value

the number of bytes written to the buffer, 0 if no further output can be produced.

Exceptions

Exception Type | Condition
System.ArgumentOutOfRangeException | if len is <= 0.
System.ArgumentOutOfRangeException | if the off and/or len are wrong.
System.FormatException | if deflated stream is invalid.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.Inflate Overload List


Inflater.Reset Method

Resets the inflater so that a new stream can be decompressed. All pending input and output will be discarded.

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


SetDictionary Method

An NDoc Documented Class Library

Inflater.SetDictionary

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

Overload List

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

public void SetDictionary(byte[]);

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

public void SetDictionary(byte[],int,int);

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.SetDictionary Method (Byte[])

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

[Visual Basic]
Overloads Public Sub SetDictionary( _
   ByVal buffer As Byte() _
)
[C#]
public void SetDictionary(
   byte[] buffer
);

Parameters

buffer

the dictionary.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if no dictionary is needed.
System.ArgumentException | if the dictionary checksum is wrong.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.SetDictionary Overload List


Inflater.SetDictionary Method (Byte[], Int32, Int32)

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

[Visual Basic]
Overloads Public Sub SetDictionary( _
   ByVal buffer As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public void SetDictionary(
   byte[] buffer,
   int off,
   int len
);

Parameters

buffer

the dictionary.

off

the offset into buffer where the dictionary starts.

len

the length of the dictionary.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if no dictionary is needed.
System.ArgumentException | if the dictionary checksum is wrong.
System.ArgumentOutOfRangeException | if the off and/or len are wrong.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.SetDictionary Overload List


SetInput Method

An NDoc Documented Class Library

Inflater.SetInput

Sets the input. This should only be called, if needsInput() returns true.

Overload List

Sets the input. This should only be called, if needsInput() returns true.

public void SetInput(byte[]);

Sets the input. This should only be called, if needsInput() returns true.

public void SetInput(byte[],int,int);

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


Inflater.SetInput Method (Byte[])

Sets the input. This should only be called, if needsInput() returns true.

[Visual Basic]
Overloads Public Sub SetInput( _
   ByVal buf As Byte() _
)
[C#]
public void SetInput(
   byte[] buf
);

Parameters

buf

the input.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if no input is needed.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.SetInput Overload List


Inflater.SetInput Method (Byte[], Int32, Int32)

Sets the input. This should only be called, if needsInput() returns true.

[Visual Basic]
Overloads Public Sub SetInput( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public void SetInput(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

the input.

off

the offset into buffer where the input starts.

len

the length of the input.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if no input is needed.
System.ArgumentOutOfRangeException | if the off and/or len are wrong.

See Also

Inflater Class | Inflater Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.SetInput Overload List


InflaterHuffmanTree Class

For a list of all members of this type, see InflaterHuffmanTree Members.

System.Object
InflaterHuffmanTree

[Visual Basic]
Public Class InflaterHuffmanTree
[C#]
public class InflaterHuffmanTree

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

InflaterHuffmanTree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree Members

Public Static (Shared) Fields

defDistTree
defLitLenTree

Public Instance Constructors

InflaterHuffmanTree Constructor Constructs a Huffman tree from the array of code lengths.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetSymbol | Reads the next symbol from input. The symbol is encoded using the huffman tree.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

InflaterHuffmanTree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree Constructor

Constructs a Huffman tree from the array of code lengths.

[Visual Basic]
Public Sub New( _
   ByVal codeLengths As Byte() _
)
[C#]
public InflaterHuffmanTree(
   byte[] codeLengths
);

Parameters

codeLengths

the array of code lengths

See Also

InflaterHuffmanTree Class | InflaterHuffmanTree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree Fields

The fields of the InflaterHuffmanTree class are listed below. For a complete list of InflaterHuffmanTree class members, see the InflaterHuffmanTree Members topic.

Public Static (Shared) Fields

defDistTree
defLitLenTree

See Also

InflaterHuffmanTree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree.defDistTree Field

[Visual Basic]
Public Shared defDistTree As ICSharpCode.SharpZipLib.Zip.Compression.InflaterHuffmanTree
[C#]
public static InflaterHuffmanTree defDistTree;

See Also

InflaterHuffmanTree Class | InflaterHuffmanTree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree.defLitLenTree Field

[Visual Basic]
Public Shared defLitLenTree As ICSharpCode.SharpZipLib.Zip.Compression.InflaterHuffmanTree
[C#]
public static InflaterHuffmanTree defLitLenTree;

See Also

InflaterHuffmanTree Class | InflaterHuffmanTree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree Methods

The methods of the InflaterHuffmanTree class are listed below. For a complete list of InflaterHuffmanTree class members, see the InflaterHuffmanTree Members topic.

Public Instance Methods

Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetSymbol | Reads the next symbol from input. The symbol is encoded using the huffman tree.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

InflaterHuffmanTree Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


InflaterHuffmanTree.GetSymbol Method

Reads the next symbol from input. The symbol is encoded using the huffman tree.

[Visual Basic]
Public Function GetSymbol( _
   ByVal input As ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator _
) As Integer
[C#]
public int GetSymbol(
   StreamManipulator input
);

Parameters

input

input the input source.

Return Value

the next symbol, or -1 if not enough input is available.

See Also

InflaterHuffmanTree Class | InflaterHuffmanTree Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Class

This class is general purpose class for writing data to a buffer. It allows you to write bits as well as bytes Based on DeflaterPending.java author of the original java version : Jochen Hoenicke

For a list of all members of this type, see PendingBuffer Members.

System.Object
PendingBuffer

[Visual Basic]
Public Class PendingBuffer
[C#]
public class PendingBuffer

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression Namespace

Assembly: SharpZipLib.dll

See Also

PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Members

Public Instance Constructors

PendingBuffer Overloaded. Initialize a new instance of the PendingBuffer class.

Public Instance Properties

BitCount
IsFlushed

Public Instance Methods

AlignToByte |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
ToByteArray |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteBits |
WriteBlock |
WriteByte |
WriteInt |
WriteShort |
WriteShortMSB |

Protected Instance Fields

buf

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

PendingBuffer Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Constructor

An NDoc Documented Class Library

PendingBuffer

Overload List

public PendingBuffer();

public PendingBuffer(int);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Constructor ()

[Visual Basic]
Overloads Public Sub New()
[C#]
public PendingBuffer();

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | PendingBuffer Constructor Overload List


PendingBuffer Constructor (Int32)

[Visual Basic]
Overloads Public Sub New( _
   ByVal bufsize As Integer _
)
[C#]
public PendingBuffer(
   int bufsize
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace | PendingBuffer Constructor Overload List


PendingBuffer Fields

The fields of the PendingBuffer class are listed below. For a complete list of PendingBuffer class members, see the PendingBuffer Members topic.

Protected Instance Fields

buf

See Also

PendingBuffer Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.buf Field

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Properties

The properties of the PendingBuffer class are listed below. For a complete list of PendingBuffer class members, see the PendingBuffer Members topic.

Public Instance Properties

BitCount
IsFlushed

See Also

PendingBuffer Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.BitCount Property

[Visual Basic]
Public ReadOnly Property BitCount As Integer
[C#]
public int BitCount {get;}

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.IsFlushed Property

[Visual Basic]
Public ReadOnly Property IsFlushed As Boolean
[C#]
public bool IsFlushed {get;}

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer Methods

The methods of the PendingBuffer class are listed below. For a complete list of PendingBuffer class members, see the PendingBuffer Members topic.

Public Instance Methods

AlignToByte |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Reset |
ToByteArray |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
WriteBits |
WriteBlock |
WriteByte |
WriteInt |
WriteShort |
WriteShortMSB |

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

PendingBuffer Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.AlignToByte Method

[Visual Basic]
Public Sub AlignToByte()
[C#]
public void AlignToByte();

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.Flush Method

Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.

[Visual Basic]
Public Function Flush( _
   ByVal output As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public int Flush(
   byte[] output,
   int offset,
   int length
);

Parameters

output

the output array;

offset

the offset into output array;

length

length the maximum number of bytes to store;

Exceptions

Exception Type | Condition
 | IndexOutOfBoundsException if offset or length are invalid.

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.ToByteArray Method

[Visual Basic]
Public Function ToByteArray() As Byte()
[C#]
public byte[] ToByteArray();

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteBits Method

[Visual Basic]
Public Sub WriteBits( _
   ByVal b As Integer, _
   ByVal count As Integer _
)
[C#]
public void WriteBits(
   int b,
   int count
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteBlock Method

[Visual Basic]
Public Sub WriteBlock( _
   ByVal block As Byte(), _
   ByVal offset As Integer, _
   ByVal len As Integer _
)
[C#]
public void WriteBlock(
   byte[] block,
   int offset,
   int len
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteByte Method

[Visual Basic]
Public Sub WriteByte( _
   ByVal b As Integer _
)
[C#]
public void WriteByte(
   int b
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteInt Method

[Visual Basic]
Public Sub WriteInt( _
   ByVal s As Integer _
)
[C#]
public void WriteInt(
   int s
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteShort Method

[Visual Basic]
Public Sub WriteShort( _
   ByVal s As Integer _
)
[C#]
public void WriteShort(
   int s
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


PendingBuffer.WriteShortMSB Method

[Visual Basic]
Public Sub WriteShortMSB( _
   ByVal s As Integer _
)
[C#]
public void WriteShortMSB(
   int s
);

See Also

PendingBuffer Class | PendingBuffer Members | ICSharpCode.SharpZipLib.Zip.Compression Namespace


ICSharpCode.SharpZipLib.Zip.Compression.Streams

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace

Namespace hierarchy

Classes

Class | Description
DeflaterOutputStream | This is a special FilterOutputStream deflating the bytes that are written through it. It uses the Deflater for deflating. authors of the original java version : Tom Tromey, Jochen Hoenicke
InflaterInputStream This filter stream is used to decompress data compressed baseInputStream the "deflate" format. The "deflate" format is described baseInputStream RFC 1951. This stream may form the basis for other decompression filters, such as the
GzipInputStream
. author of the original java version : John Leuner
OutputWindow | Contains the output from the Inflation process. We need to have a window so that we can refer backwards into the output stream to repeat stuff. author of the original java version : John Leuner
StreamManipulator | This class allows us to retrieve a specified amount of bits from the input buffer, as well as copy big byte blocks. It uses an int buffer to store up to 31 bits for direct manipulation. This guarantees that we can get at least 16 bits, but we only need at most 15, so this is all safe. There are some optimizations in this class, for example, you must never peek more then 8 bits more than needed, and you must first peek bits before you may drop them. This is not a general purpose class but optimized for the behaviour of the Inflater. authors of the original java version : John Leuner, Jochen Hoenicke


DeflaterOutputStream Class

This is a special FilterOutputStream deflating the bytes that are written through it. It uses the Deflater for deflating. authors of the original java version : Tom Tromey, Jochen Hoenicke

For a list of all members of this type, see DeflaterOutputStream Members.

System.Object
MarshalByRefObject
Stream
DeflaterOutputStream

[Visual Basic]
Public Class DeflaterOutputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class DeflaterOutputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace

Assembly: SharpZipLib.dll

See Also

DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream Members

Public Instance Constructors

DeflaterOutputStream Overloaded. Initialize a new instance of the DeflaterOutputStream class.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Calls finish () and closes the stream.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the stream by calling finish() on the deflater.
Flush | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes a len bytes from an array to the compressed stream.
WriteByte | Writes a single byte to the compressed output stream.

Protected Instance Fields

baseOutputStream | base stream the deflater depends on.
buf | This buffer is used temporarily to retrieve the bytes from the deflater and write them to the underlying output stream.
def | The deflater which is used to deflate the stream.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

DeflaterOutputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream Constructor

An NDoc Documented Class Library

DeflaterOutputStream

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.

Overload List

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.

public DeflaterOutputStream(Stream);

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.

public DeflaterOutputStream(Stream,Deflater);

Creates a new DeflaterOutputStream with the given Deflater and buffer size.

public DeflaterOutputStream(Stream,Deflater,int);

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream Constructor (Stream)

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream _
)
[C#]
public DeflaterOutputStream(
   Stream baseOutputStream
);

Parameters

baseOutputStream

the output stream where deflated output should be written.

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | DeflaterOutputStream Constructor Overload List


DeflaterOutputStream Constructor (Stream, Deflater)

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream, _
   ByVal defl As ICSharpCode.SharpZipLib.Zip.Compression.Deflater _
)
[C#]
public DeflaterOutputStream(
   Stream baseOutputStream,
   Deflater defl
);

Parameters

baseOutputStream

the output stream where deflated output should be written.

defl

the underlying deflater.

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | DeflaterOutputStream Constructor Overload List


DeflaterOutputStream Constructor (Stream, Deflater, Int32)

Creates a new DeflaterOutputStream with the given Deflater and buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseOutputStream As System.IO.Stream, _
   ByVal defl As ICSharpCode.SharpZipLib.Zip.Compression.Deflater, _
   ByVal bufsize As Integer _
)
[C#]
public DeflaterOutputStream(
   Stream baseOutputStream,
   Deflater defl,
   int bufsize
);

Parameters

baseOutputStream

the output stream where deflated output should be written.

defl

the underlying deflater.

bufsize

the buffer size.

Exceptions

Exception Type | Condition
System.InvalidOperationException | if bufsize isn't positive.

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | DeflaterOutputStream Constructor Overload List


DeflaterOutputStream Fields

The fields of the DeflaterOutputStream class are listed below. For a complete list of DeflaterOutputStream class members, see the DeflaterOutputStream Members topic.

Protected Instance Fields

baseOutputStream | base stream the deflater depends on.
buf | This buffer is used temporarily to retrieve the bytes from the deflater and write them to the underlying output stream.
def | The deflater which is used to deflate the stream.

See Also

DeflaterOutputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.baseOutputStream Field

base stream the deflater depends on.

[Visual Basic]
Protected baseOutputStream As System.IO.Stream
[C#]
protected Stream baseOutputStream;

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.buf Field

This buffer is used temporarily to retrieve the bytes from the deflater and write them to the underlying output stream.

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.def Field

The deflater which is used to deflate the stream.

[Visual Basic]
Protected def As ICSharpCode.SharpZipLib.Zip.Compression.Deflater
[C#]
protected Deflater def;

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream Properties

The properties of the DeflaterOutputStream class are listed below. For a complete list of DeflaterOutputStream class members, see the DeflaterOutputStream Members topic.

Public Instance Properties

CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

DeflaterOutputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream Methods

The methods of the DeflaterOutputStream class are listed below. For a complete list of DeflaterOutputStream class members, see the DeflaterOutputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Calls finish () and closes the stream.
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Finish | Finishes the stream by calling finish() on the deflater.
Flush | Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | I needed to implement the abstract member.
ReadByte | I needed to implement the abstract member.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | Writes a len bytes from an array to the compressed stream.
WriteByte | Writes a single byte to the compressed output stream.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
deflate Deflates everything in the def's input buffers. This will call
def.deflate()
until all bytes from the input buffers are processed.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

DeflaterOutputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Close Method

Calls finish () and closes the stream.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.deflate Method

Deflates everything in the def's input buffers. This will call

def.deflate()
until all bytes from the input buffers are processed.

[Visual Basic]
Protected Sub deflate()
[C#]
protected void deflate();

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Finish Method

Finishes the stream by calling finish() on the deflater.

[Visual Basic]
Overridable Public Sub Finish()
[C#]
public virtual void Finish();

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Flush Method

Flushes the stream by calling flush() on the deflater and then on the underlying stream. This ensures that all bytes are flushed.

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Read Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.ReadByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.Write Method

Writes a len bytes from an array to the compressed stream.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public override void Write(
   byte[] buf,
   int off,
   int len
);

Parameters

buf

the byte array.

off

the offset into the byte array where to start.

len

the number of bytes to write.

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


DeflaterOutputStream.WriteByte Method

Writes a single byte to the compressed output stream.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal bval As Byte _
)
[C#]
public override void WriteByte(
   byte bval
);

Parameters

bval

the byte value.

See Also

DeflaterOutputStream Class | DeflaterOutputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Class

This filter stream is used to decompress data compressed baseInputStream the "deflate" format. The "deflate" format is described baseInputStream RFC 1951. This stream may form the basis for other decompression filters, such as the

GzipInputStream
. author of the original java version : John Leuner

For a list of all members of this type, see InflaterInputStream Members.

System.Object
MarshalByRefObject
Stream
InflaterInputStream

[Visual Basic]
Public Class InflaterInputStream
   Inherits Stream
   Implements IDisposable
[C#]
public class InflaterInputStream : Stream, IDisposable

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace

Assembly: SharpZipLib.dll

See Also

InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Members

Public Instance Constructors

InflaterInputStream Overloaded. Initialize a new instance of the InflaterInputStream class.

Public Instance Properties

Available | Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.
CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Decompresses data into the byte array
ReadByte | Reads one byte of decompressed data. The byte is baseInputStream the lower 8 bits of the int.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
Skip | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Fields

baseInputStream | base stream the inflater depends on.
buf | Byte array used as a buffer
inf | Decompressor for this filter
len | Size of buffer

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

InflaterInputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Constructor

An NDoc Documented Class Library

InflaterInputStream

Create an InflaterInputStream with the default decompresseor and a default buffer size.

Overload List

Create an InflaterInputStream with the default decompresseor and a default buffer size.

public InflaterInputStream(Stream);

Create an InflaterInputStream with the specified decompresseor and a default buffer size.

public InflaterInputStream(Stream,Inflater);

Create an InflaterInputStream with the specified decompresseor and a specified buffer size.

public InflaterInputStream(Stream,Inflater,int);

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Constructor (Stream)

Create an InflaterInputStream with the default decompresseor and a default buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseInputStream As System.IO.Stream _
)
[C#]
public InflaterInputStream(
   Stream baseInputStream
);

Parameters

baseInputStream

the InputStream to read bytes from

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | InflaterInputStream Constructor Overload List


InflaterInputStream Constructor (Stream, Inflater)

Create an InflaterInputStream with the specified decompresseor and a default buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseInputStream As System.IO.Stream, _
   ByVal inf As ICSharpCode.SharpZipLib.Zip.Compression.Inflater _
)
[C#]
public InflaterInputStream(
   Stream baseInputStream,
   Inflater inf
);

Parameters

baseInputStream

the InputStream to read bytes from

inf

the decompressor used to decompress data read from baseInputStream

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | InflaterInputStream Constructor Overload List


InflaterInputStream Constructor (Stream, Inflater, Int32)

Create an InflaterInputStream with the specified decompresseor and a specified buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal baseInputStream As System.IO.Stream, _
   ByVal inf As ICSharpCode.SharpZipLib.Zip.Compression.Inflater, _
   ByVal size As Integer _
)
[C#]
public InflaterInputStream(
   Stream baseInputStream,
   Inflater inf,
   int size
);

Parameters

baseInputStream

the InputStream to read bytes from

inf

the decompressor used to decompress data read from baseInputStream

size

size of the buffer to use

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace | InflaterInputStream Constructor Overload List


InflaterInputStream Fields

The fields of the InflaterInputStream class are listed below. For a complete list of InflaterInputStream class members, see the InflaterInputStream Members topic.

Protected Instance Fields

baseInputStream | base stream the inflater depends on.
buf | Byte array used as a buffer
inf | Decompressor for this filter
len | Size of buffer

See Also

InflaterInputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.baseInputStream Field

base stream the inflater depends on.

[Visual Basic]
Protected baseInputStream As System.IO.Stream
[C#]
protected Stream baseInputStream;

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.buf Field

Byte array used as a buffer

[Visual Basic]
Protected buf As Byte()
[C#]
protected byte[] buf;

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.inf Field

Decompressor for this filter

[Visual Basic]
Protected inf As ICSharpCode.SharpZipLib.Zip.Compression.Inflater
[C#]
protected Inflater inf;

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.len Field

Size of buffer

[Visual Basic]
Protected len As Integer
[C#]
protected int len;

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Properties

The properties of the InflaterInputStream class are listed below. For a complete list of InflaterInputStream class members, see the InflaterInputStream Members topic.

Public Instance Properties

Available | Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.
CanRead | I needed to implement the abstract member.
CanSeek | I needed to implement the abstract member.
CanWrite | I needed to implement the abstract member.
Length | I needed to implement the abstract member.
Position | I needed to implement the abstract member.

See Also

InflaterInputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Available Property

Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.

[Visual Basic]
Overridable Public ReadOnly Property Available As Integer
[C#]
public int Available {virtual get;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.CanRead Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public bool CanRead {override get;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.CanSeek Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public bool CanSeek {override get;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.CanWrite Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public bool CanWrite {override get;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Length Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public long Length {override get;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Position Property

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public long Position {override get; override set;}

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream Methods

The methods of the InflaterInputStream class are listed below. For a complete list of InflaterInputStream class members, see the InflaterInputStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
BeginWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Close | Closes the input stream
CreateObjRef (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
EndRead (inherited from Stream) | Select the method name to go to the Microsoft documentation.
EndWrite (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
Flush | Flushes the baseInputStream
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
InitializeLifetimeService (inherited from MarshalByRefObject) | Select the method name to go to the Microsoft documentation.
Read | Decompresses data into the byte array
ReadByte | Reads one byte of decompressed data. The byte is baseInputStream the lower 8 bits of the int.
Seek | I needed to implement the abstract member.
SetLength | I needed to implement the abstract member.
Skip | Skip specified number of bytes of uncompressed data
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write | I needed to implement the abstract member.
WriteByte | I needed to implement the abstract member.

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Select the method name to go to the Microsoft documentation.
Fill | Fills the buffer with more data to decompress.
Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream) Select the method name to go to the Microsoft documentation.

See Also

InflaterInputStream Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Close Method

Closes the input stream

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Fill Method

Fills the buffer with more data to decompress.

[Visual Basic]
Protected Sub Fill()
[C#]
protected void Fill();

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Flush Method

Flushes the baseInputStream

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Read Method

Decompresses data into the byte array

[Visual Basic]
Overrides Public Function Read( _
   ByVal b As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public override int Read(
   byte[] b,
   int off,
   int len
);

Parameters

b

the array to read and decompress data into

off

the offset indicating where the data should be placed

len

the number of bytes to decompress

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.ReadByte Method

Reads one byte of decompressed data. The byte is baseInputStream the lower 8 bits of the int.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Seek Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As System.IO.SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.SetLength Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal val As Long _
)
[C#]
public override void SetLength(
   long val
);

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Skip Method

Skip specified number of bytes of uncompressed data

[Visual Basic]
Public Function Skip( _
   ByVal n As Long _
) As Long
[C#]
public long Skip(
   long n
);

Parameters

n

number of bytes to skip

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.Write Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal array As Byte(), _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public override void Write(
   byte[] array,
   int offset,
   int count
);

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


InflaterInputStream.WriteByte Method

I needed to implement the abstract member.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal val As Byte _
)
[C#]
public override void WriteByte(
   byte val
);

See Also

InflaterInputStream Class | InflaterInputStream Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow Class

Contains the output from the Inflation process. We need to have a window so that we can refer backwards into the output stream to repeat stuff. author of the original java version : John Leuner

For a list of all members of this type, see OutputWindow Members.

System.Object
OutputWindow

[Visual Basic]
Public Class OutputWindow
[C#]
public class OutputWindow

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace

Assembly: SharpZipLib.dll

See Also

OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow Members

Public Instance Constructors

OutputWindow Constructor

Public Instance Methods

CopyDict |
CopyOutput |
CopyStored |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetAvailable |
GetFreeSpace |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Repeat |
Reset |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

OutputWindow Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow Constructor

[Visual Basic]
Public Sub New()
[C#]
public OutputWindow();

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow Methods

The methods of the OutputWindow class are listed below. For a complete list of OutputWindow class members, see the OutputWindow Members topic.

Public Instance Methods

CopyDict |
CopyOutput |
CopyStored |
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetAvailable |
GetFreeSpace |
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
Repeat |
Reset |
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.
Write |

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

OutputWindow Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.CopyDict Method

[Visual Basic]
Public Sub CopyDict( _
   ByVal dict As Byte(), _
   ByVal offset As Integer, _
   ByVal len As Integer _
)
[C#]
public void CopyDict(
   byte[] dict,
   int offset,
   int len
);

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.CopyOutput Method

[Visual Basic]
Public Function CopyOutput( _
   ByVal output As Byte(), _
   ByVal offset As Integer, _
   ByVal len As Integer _
) As Integer
[C#]
public int CopyOutput(
   byte[] output,
   int offset,
   int len
);

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.CopyStored Method

[Visual Basic]
Public Function CopyStored( _
   ByVal input As ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator, _
   ByVal len As Integer _
) As Integer
[C#]
public int CopyStored(
   StreamManipulator input,
   int len
);

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.GetAvailable Method

[Visual Basic]
Public Function GetAvailable() As Integer
[C#]
public int GetAvailable();

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.GetFreeSpace Method

[Visual Basic]
Public Function GetFreeSpace() As Integer
[C#]
public int GetFreeSpace();

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.Repeat Method

[Visual Basic]
Public Sub Repeat( _
   ByVal len As Integer, _
   ByVal dist As Integer _
)
[C#]
public void Repeat(
   int len,
   int dist
);

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


OutputWindow.Write Method

[Visual Basic]
Public Sub Write( _
   ByVal abyte As Integer _
)
[C#]
public void Write(
   int abyte
);

See Also

OutputWindow Class | OutputWindow Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator Class

This class allows us to retrieve a specified amount of bits from the input buffer, as well as copy big byte blocks. It uses an int buffer to store up to 31 bits for direct manipulation. This guarantees that we can get at least 16 bits, but we only need at most 15, so this is all safe. There are some optimizations in this class, for example, you must never peek more then 8 bits more than needed, and you must first peek bits before you may drop them. This is not a general purpose class but optimized for the behaviour of the Inflater. authors of the original java version : John Leuner, Jochen Hoenicke

For a list of all members of this type, see StreamManipulator Members.

System.Object
StreamManipulator

[Visual Basic]
Public Class StreamManipulator
[C#]
public class StreamManipulator

Requirements

Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace

Assembly: SharpZipLib.dll

See Also

StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator Members

Public Instance Constructors

StreamManipulator Constructor

Public Instance Properties

AvailableBits | Gets the number of bits available in the bit buffer. This must be only called when a previous peekBits() returned -1.
AvailableBytes | Gets the number of bytes available.
IsNeedingInput |

Public Instance Methods

CopyBytes | Copies length bytes from input buffer to output buffer starting at output[offset]. You have to make sure, that the buffer is byte aligned. If not enough bytes are available, copies fewer bytes.
DropBits | Drops the next n bits from the input. You should have called peekBits with a bigger or equal n before, to make sure that enough bits are in the bit buffer.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBits | Gets the next n bits and increases input pointer. This is equivalent to peekBits followed by dropBits, except for correct error handling.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
PeekBits | Get the next n bits but don't increase input pointer. n must be less or equal 16 and if you if this call succeeds, you must drop at least n-8 bits in the next call.
Reset |
SetInput |
SkipToByteBoundary | Skips to the next byte boundary.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

StreamManipulator Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator Constructor

[Visual Basic]
Public Sub New()
[C#]
public StreamManipulator();

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator Properties

The properties of the StreamManipulator class are listed below. For a complete list of StreamManipulator class members, see the StreamManipulator Members topic.

Public Instance Properties

AvailableBits | Gets the number of bits available in the bit buffer. This must be only called when a previous peekBits() returned -1.
AvailableBytes | Gets the number of bytes available.
IsNeedingInput |

See Also

StreamManipulator Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.AvailableBits Property

Gets the number of bits available in the bit buffer. This must be only called when a previous peekBits() returned -1.

[Visual Basic]
Public ReadOnly Property AvailableBits As Integer
[C#]
public int AvailableBits {get;}

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.AvailableBytes Property

Gets the number of bytes available.

[Visual Basic]
Public ReadOnly Property AvailableBytes As Integer
[C#]
public int AvailableBytes {get;}

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.IsNeedingInput Property

[Visual Basic]
Public ReadOnly Property IsNeedingInput As Boolean
[C#]
public bool IsNeedingInput {get;}

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator Methods

The methods of the StreamManipulator class are listed below. For a complete list of StreamManipulator class members, see the StreamManipulator Members topic.

Public Instance Methods

CopyBytes | Copies length bytes from input buffer to output buffer starting at output[offset]. You have to make sure, that the buffer is byte aligned. If not enough bytes are available, copies fewer bytes.
DropBits | Drops the next n bits from the input. You should have called peekBits with a bigger or equal n before, to make sure that enough bits are in the bit buffer.
Equals (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetBits | Gets the next n bits and increases input pointer. This is equivalent to peekBits followed by dropBits, except for correct error handling.
GetHashCode (inherited from Object) | Select the method name to go to the Microsoft documentation.
GetType (inherited from Object) | Select the method name to go to the Microsoft documentation.
PeekBits | Get the next n bits but don't increase input pointer. n must be less or equal 16 and if you if this call succeeds, you must drop at least n-8 bits in the next call.
Reset |
SetInput |
SkipToByteBoundary | Skips to the next byte boundary.
ToString (inherited from Object) | Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object) | Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object) | Select the method name to go to the Microsoft documentation.

See Also

StreamManipulator Class | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.CopyBytes Method

Copies length bytes from input buffer to output buffer starting at output[offset]. You have to make sure, that the buffer is byte aligned. If not enough bytes are available, copies fewer bytes.

[Visual Basic]
Public Function CopyBytes( _
   ByVal output As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Integer
[C#]
public int CopyBytes(
   byte[] output,
   int offset,
   int length
);

Parameters

output

the buffer.

offset

the offset in the buffer.

length

the length to copy, 0 is allowed.

Return Value

the number of bytes copied, 0 if no byte is available.

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.DropBits Method

Drops the next n bits from the input. You should have called peekBits with a bigger or equal n before, to make sure that enough bits are in the bit buffer.

[Visual Basic]
Public Sub DropBits( _
   ByVal n As Integer _
)
[C#]
public void DropBits(
   int n
);

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.GetBits Method

Gets the next n bits and increases input pointer. This is equivalent to peekBits followed by dropBits, except for correct error handling.

[Visual Basic]
Public Function GetBits( _
   ByVal n As Integer _
) As Integer
[C#]
public int GetBits(
   int n
);

Return Value

the value of the bits, or -1 if not enough bits available.

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.PeekBits Method

Get the next n bits but don't increase input pointer. n must be less or equal 16 and if you if this call succeeds, you must drop at least n-8 bits in the next call.

[Visual Basic]
Public Function PeekBits( _
   ByVal n As Integer _
) As Integer
[C#]
public int PeekBits(
   int n
);

Return Value

the value of the bits, or -1 if not enough bits available. */

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.Reset Method

[Visual Basic]
Public Sub Reset()
[C#]
public void Reset();

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.SetInput Method

[Visual Basic]
Public Sub SetInput( _
   ByVal buf As Byte(), _
   ByVal off As Integer, _
   ByVal len As Integer _
)
[C#]
public void SetInput(
   byte[] buf,
   int off,
   int len
);

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


StreamManipulator.SkipToByteBoundary Method

Skips to the next byte boundary.

[Visual Basic]
Public Sub SkipToByteBoundary()
[C#]
public void SkipToByteBoundary();

See Also

StreamManipulator Class | StreamManipulator Members | ICSharpCode.SharpZipLib.Zip.Compression.Streams Namespace


ICSharpCode.SharpZipLib.BZip2Hierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.BZip2 Hierarchy

System.Object
-BZip2
-BZip2Constants
-MarshalByRefObject
-Stream
-BZip2InputStream
-BZip2OutputStream
-DeflaterOutputStream
-GZipOutputStream
-ZipOutputStream
-InflaterInputStream
-GZipInputStream
-ZipInputStream
-TarInputStream
-TarOutputStream


ICSharpCode.SharpZipLib.ChecksumsHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Checksums Hierarchy

System.Object
-Adler32
-Crc32
-StrangeCRC

Interfaces

IChecksum


ICSharpCode.SharpZipLib.GZipHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.GZip Hierarchy

System.Object
-GZipConstants
-MarshalByRefObject
-Stream
-BZip2InputStream
-BZip2OutputStream
-DeflaterOutputStream
-GZipOutputStream
-ZipOutputStream
-InflaterInputStream
-GZipInputStream
-ZipInputStream
-TarInputStream
-TarOutputStream


ICSharpCode.SharpZipLib.TarHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Tar Hierarchy

System.Object
-Exception
-SystemException
-IOException
-InvalidHeaderException
-ZipException
-MarshalByRefObject
-Stream
-BZip2InputStream
-BZip2OutputStream
-DeflaterOutputStream
-GZipOutputStream
-ZipOutputStream
-InflaterInputStream
-GZipInputStream
-ZipInputStream
-TarInputStream
-TarOutputStream
-TarArchive
-TarBuffer
-TarEntry
-TarHeader
-EntryFactoryAdapter

Interfaces

TarInputStream.IEntryFactory


ICSharpCode.SharpZipLib.Zip.Compression.StreamsHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip.Compression.Streams Hierarchy

System.Object
-MarshalByRefObject
-Stream
-BZip2InputStream
-BZip2OutputStream
-DeflaterOutputStream
-GZipOutputStream
-ZipOutputStream
-InflaterInputStream
-GZipInputStream
-ZipInputStream
-TarInputStream
-TarOutputStream
-OutputWindow
-StreamManipulator


ICSharpCode.SharpZipLib.Zip.CompressionHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip.Compression Hierarchy

System.Object
-Deflater
-DeflaterConstants
-DeflaterEngine
-DeflaterHuffman
-Tree
-Inflater
-InflaterHuffmanTree
-PendingBuffer
-DeflaterPending


ICSharpCode.SharpZipLib.ZipHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib.Zip Hierarchy

System.Object
-MarshalByRefObject
-Stream
-BZip2InputStream
-BZip2OutputStream
-DeflaterOutputStream
-GZipOutputStream
-ZipOutputStream
-InflaterInputStream
-GZipInputStream
-ZipInputStream
-TarInputStream
-TarOutputStream
-ZipConstants
-ZipEntry
-ZipFile


ICSharpCode.SharpZipLibHierarchy

An NDoc Documented Class Library

ICSharpCode.SharpZipLib Hierarchy

System.Object
-Exception
-SystemException
-IOException
-InvalidHeaderException
-ZipException