![xojo msgbox xojo msgbox](https://i.ytimg.com/vi/YHMBQJeLV4E/maxresdefault.jpg)
![xojo msgbox xojo msgbox](https://demo.dokumen.tips/img/380x512/reader023/reader/2020111714/5878a6b41a28ab890a8b7882/r-2.jpg)
Copy the zlib, USTAR, and PKZip modules into your project and save.Įnsure the zlib shared library is installed.Open the RB-zlib project in REALstudio or Xojo.
#Xojo msgbox archive
#Xojo msgbox how to
Close How to incorporate zlib into your Realbasic/Xojo project Import the zlib, USTAR, and PKZip modules ReadAll ' read/decompress from the socket Lookahead, CRLF + CRLF) + 3)ĭim z As zlib. Write( "GET / HTTP/1.0" + CRLF + "Accept-Encoding: gzip" + CRLF + "Connection: close" + CRLF + "Host: + CRLF + CRLF)ĭim headers As String = sock. For example, creating an in-memory compression stream from a zero-length MemoryBlock and writing a string to it: Instances of ZStream can be created from MemoryBlocks, FolderItems, and objects that implement the Readable and/or Writeable interfaces. Anything written to a ZStream is compressed and emitted to the output stream (another Writeable) reading from a ZStream decompresses data from the input stream (another Readable). The ZStream is a BinaryStream work-alike and implements both the Readable and Writeable interfaces. The second way to compress or decompress data is with the ZStream class. For example, GZip and GUnZip are just wrappers around Deflate and Inflate with options that specify the gzip format. Refer to the examples below for demonstrations of some of these functions.Īdditional optional arguments may be passed, to control the compression level, strategy, dictionary, and encoding. Methods that do not have a Destination parameter return output as a MemoryBlock instead. Where source is a MemoryBlock, FolderItem, or an object which implements the Readable interface and destination (when provided) is a FolderItem or an object which implements the Writeable interface. All variations follow either this signature:įunction(source, options) As MemoryBlock The zlib module provides several utility methods for basic compression or decompression of data:Īll of these methods are overloaded with several useful variations on input and output parameters. Refer to the PKZip and USTAR modules for information on working with archives. The following section covers using zlib for general purpose compression. Supports gzip, deflate, and raw deflate compressed streams.Read and write tape archives (.tar), with or without gzip compression.Read and write compressed file or memory streams using a simple BinaryStream work-alike.The minimum supported Xojo version is RS2009R3. The minimum supported zlib version is 1.2.8. RB-zlib is a zlib binding for Realbasic and Xojo projects. Deflate is the algorithm used by the gzip container format, the zip archive format, and HTTP compression. Zlib is the reference implementation for the deflate compression algorithm.