C# 클래스 ICSharpCode.SharpZipLib.Zip.ZipHelperStream

This class assists with writing/reading from Zip files.
상속: Stream
파일 보기 프로젝트 열기: icsharpcode/SharpZipLib 1 사용 예제들

공개 메소드들

메소드 설명
Flush ( ) : void
LocateBlockWithSignature ( int signature, long endLocation, int minimumBlockSize, int maximumVariableData ) : long

Locates a block with the desired signature.

Read ( byte buffer, int offset, int count ) : int
ReadDataDescriptor ( bool zip64, DescriptorData data ) : void

Read data descriptor at the end of compressed data.

ReadLEInt ( ) : int

Read an int in little endian byte order.

ReadLELong ( ) : long

Read a long in little endian byte order.

ReadLEShort ( ) : int

Read an unsigned short in little endian byte order.

Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int count ) : void
WriteDataDescriptor ( ZipEntry entry ) : int

Write a data descriptor.

WriteEndOfCentralDirectory ( long noOfEntries, long sizeEntries, long startOfCentralDirectory, byte comment ) : void

Write the required records to end the central directory.

WriteLEInt ( int value ) : void

Write an int in little endian byte order.

WriteLELong ( long value ) : void

Write a long in little endian byte order.

WriteLEShort ( int value ) : void

Write an unsigned short in little endian byte order.

WriteLEUint ( uint value ) : void

Write a uint in little endian byte order.

WriteLEUlong ( ulong value ) : void

Write a ulong in little endian byte order.

WriteLEUshort ( ushort value ) : void

Write a ushort in little endian byte order.

WriteZip64EndOfCentralDirectory ( long noOfEntries, long sizeEntries, long centralDirOffset ) : void

Write Zip64 end of central directory records (File header and locator).

ZipHelperStream ( Stream stream ) : System

Initialise a new instance of ZipHelperStream.

ZipHelperStream ( string name ) : System

Initialise an instance of this class.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Close the stream.

The underlying stream is closed only if IsStreamOwner is true.

비공개 메소드들

메소드 설명
WriteLocalHeader ( ZipEntry entry, EntryPatchData patchData ) : void

메소드 상세

Dispose() 보호된 메소드

Close the stream.
The underlying stream is closed only if IsStreamOwner is true.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

Flush() 공개 메소드

public Flush ( ) : void
리턴 void

LocateBlockWithSignature() 공개 메소드

Locates a block with the desired signature.
public LocateBlockWithSignature ( int signature, long endLocation, int minimumBlockSize, int maximumVariableData ) : long
signature int The signature to find.
endLocation long Location, marking the end of block.
minimumBlockSize int Minimum size of the block.
maximumVariableData int The maximum variable data.
리턴 long

Read() 공개 메소드

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
리턴 int

ReadDataDescriptor() 공개 메소드

Read data descriptor at the end of compressed data.
public ReadDataDescriptor ( bool zip64, DescriptorData data ) : void
zip64 bool if set to true [zip64].
data DescriptorData The data to fill in.
리턴 void

ReadLEInt() 공개 메소드

Read an int in little endian byte order.
/// An i/o error occurs. /// /// The file ends prematurely ///
public ReadLEInt ( ) : int
리턴 int

ReadLELong() 공개 메소드

Read a long in little endian byte order.
public ReadLELong ( ) : long
리턴 long

ReadLEShort() 공개 메소드

Read an unsigned short in little endian byte order.
/// An i/o error occurs. /// /// The file ends prematurely ///
public ReadLEShort ( ) : int
리턴 int

Seek() 공개 메소드

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
리턴 long

SetLength() 공개 메소드

public SetLength ( long value ) : void
value long
리턴 void

Write() 공개 메소드

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
리턴 void

WriteDataDescriptor() 공개 메소드

Write a data descriptor.
public WriteDataDescriptor ( ZipEntry entry ) : int
entry ZipEntry The entry to write a descriptor for.
리턴 int

WriteEndOfCentralDirectory() 공개 메소드

Write the required records to end the central directory.
public WriteEndOfCentralDirectory ( long noOfEntries, long sizeEntries, long startOfCentralDirectory, byte comment ) : void
noOfEntries long The number of entries in the directory.
sizeEntries long The size of the entries in the directory.
startOfCentralDirectory long The start of the central directory.
comment byte The archive comment. (This can be null).
리턴 void

WriteLEInt() 공개 메소드

Write an int in little endian byte order.
public WriteLEInt ( int value ) : void
value int The value to write.
리턴 void

WriteLELong() 공개 메소드

Write a long in little endian byte order.
public WriteLELong ( long value ) : void
value long The value to write.
리턴 void

WriteLEShort() 공개 메소드

Write an unsigned short in little endian byte order.
public WriteLEShort ( int value ) : void
value int The value to write.
리턴 void

WriteLEUint() 공개 메소드

Write a uint in little endian byte order.
public WriteLEUint ( uint value ) : void
value uint The value to write.
리턴 void

WriteLEUlong() 공개 메소드

Write a ulong in little endian byte order.
public WriteLEUlong ( ulong value ) : void
value ulong The value to write.
리턴 void

WriteLEUshort() 공개 메소드

Write a ushort in little endian byte order.
public WriteLEUshort ( ushort value ) : void
value ushort The value to write.
리턴 void

WriteZip64EndOfCentralDirectory() 공개 메소드

Write Zip64 end of central directory records (File header and locator).
public WriteZip64EndOfCentralDirectory ( long noOfEntries, long sizeEntries, long centralDirOffset ) : void
noOfEntries long The number of entries in the central directory.
sizeEntries long The size of entries in the central directory.
centralDirOffset long The offset of the dentral directory.
리턴 void

ZipHelperStream() 공개 메소드

Initialise a new instance of ZipHelperStream.
public ZipHelperStream ( Stream stream ) : System
stream Stream The stream to use.
리턴 System

ZipHelperStream() 공개 메소드

Initialise an instance of this class.
public ZipHelperStream ( string name ) : System
name string The name of the file to open.
리턴 System