PowerTCP Zip Compression for .NET
Write Method (Archive)




The storage location for the written data.
The zero-based position in the buffer from which to begin writing from.
The exact number of bytes to write.
Writes a sequence of compressed bytes to the Archive and returns when the operation is complete.
Syntax
Public Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) 
Dim instance As Archive
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
 
instance.Write(buffer, offset, count)
public void Write( 
   byte[] buffer,
   int offset,
   int count
)
public: void Write( 
   byte[]* buffer,
   int offset,
   int count
) 
public:
void Write( 
   array<byte>^ buffer,
   int offset,
   int count
) 

Parameters

buffer
The storage location for the written data.
offset
The zero-based position in the buffer from which to begin writing from.
count
The exact number of bytes to write.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThrown when the buffer is null.
System.ArgumentOutOfRangeExceptionThrown when the offset is less than zero or when count is less than or equal to zero.
System.ArgumentExceptionThrown when the (offset + count) > buffer.Length.
Remarks

This method allows the user to uncompress an Archive "on the fly" without using intermediate disk storage to buffer the entire zip archive first. Files are restored to the location specifed by the Archive.DestinationDirectory. This feature is useful for streaming applications where the zip file must be processed buffer by buffer.

Gzip files are not supported by this streaming technique. Archive.Unzip must be used to inflate Gzip-compressed files.

See Also

Reference

Archive Class
Archive Members


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic