PowerTCP Zip Compression for .NET
Read Method (Archive)




The storage location for the received data.
The zero-based position in the buffer at which to store the received data.
The maximum number of bytes to read.
Reads at least one byte of compressed data from the Archive and copies it into the provided buffer.
Syntax
Public Function Read( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Integer
Dim instance As Archive
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
Dim value As Integer
 
value = instance.Read(buffer, offset, count)
public int Read( 
   byte[] buffer,
   int offset,
   int count
)
public: int Read( 
   byte[]* buffer,
   int offset,
   int count
) 
public:
int Read( 
   array<byte>^ buffer,
   int offset,
   int count
) 

Parameters

buffer
The storage location for the received data.
offset
The zero-based position in the buffer at which to store the received data.
count
The maximum number of bytes to read.

Return Value

The total number of bytes read into the buffer.
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 compress an Archive "on the fly" without using intermediate disk storage. This feature is useful for streaming applications.

Since each file must be compressed before the local header can be created, it will take longer to generate the first buffer of each ArchiveItem (subsequent buffers for the same ArchiveItem are filled quickly).

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