e-CryptIt Engine Xojo and Real Studio Plugin

ZStreamWriter Class (console safe)

To handle zip compression (.gz format) on files or streams then use the ZStreamWriter class.

Notes:
REALbasic 5.5 or later is needed for this class. This class will not show up on older versions of REALbasic.

Object
   ZStreamWriter

class ZStreamWriter implements

IBinaryStreamWriter

IBlockWriter

Constructors

ZStreamWriterA constructor which will direct the output of the stream to a file. (FolderItem)
ZStreamWriterA constructor which will direct the output of the stream to any class that implements the IBinaryStreamWriter interface.
ZStreamWriterA constructor which will direct the output of the stream to a file (FolderItem) and take a buffer MemoryBlock object to do custom buffering.
ZStreamWriterA constructor which will direct the output of the stream to any class that implements the IBinaryStreamWriter interface and it also takes a buffer MemoryBlock object to do custom buffering.
ZStreamWriterA constructor which will direct the output of the stream to a BinaryStream object that is open in Write mode. This constructor also takes a boolean parameter to optionally skip gz headers in the output.

Properties

Buffer (console safe) This property can be used to obtain or set the MemoryBlock that is used for a shared memory block based decompression.
CompressedSize (console safe) Returns the size of the compressed data in the stream.
CRC (console safe) Returns the CRC of the uncompressed data in the stream.
Position (console safe) Returns the cursor position within the stream.
UncompressedSize (console safe) Returns the size of the uncompressed data in the stream.

Methods

Close (console safe) To close the stream. The stream is also closed when it is deconstructed.
LastError (console safe) This property returns the error code for the last operation. Zero means no error, another value means a file error. The code used by the File Manager, see Inside Macintosh at the Apple Website.
Seek (console safe) To move, relatively or absolutely, the cursor in the stream.
Write (console safe) To write the data into the stream.
WriteBlock (console safe) Call the WriteBlock method in a loop to let the stream compress data from the shared memory block.

Supported Platforms:

  • MacOS X Carbon
  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit