Platforms to show: All Mac Windows Linux Cross-Platform
Back to ZipMBS class.
ZipMBS.Close(GlobalComment as string="")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 8.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 8.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
ZipMBS.CloseFileRaw(UncompressedSize as Integer, CRC32 as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 8.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For files opened with parameter raw=true in CreateFile
UncompressedSize and crc32 are value for the uncompressed size,
ZipMBS.Constructor(file as folderitem, append as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 8.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the file exist and append is AppendStatusCreateAfter, the zip will be created at the end of the file.
(useful if the file contain a self extractor code)
If the file exist and append is AppendStatusAddInZip, we will add files in existing zip (be sure you don't add file that doesn't exist)
If the zipfile cannot be opened, the handle value will be zero.
AppendStatusCreateAfter seems not to be working currently.
If you run this class in a thread, please make sure your thread has a big stack (1 MB or more). Else it will crash.
ZipMBS.CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string = "", ExtraGlobal as string = "", Comment as String = "", CompressionMethod as Integer = 8, Level as Integer = 9, Zip64 as boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
filename: the filename in zip. This can include path information with slash as delimiter. e.g. "foldername/file.txt"
FileInfo: the file date.
ExtraLocal: contains the extrafield data the the local header.
ExtraGlobal: contains the extrafield data the the local header.
Comment: comment contain the comment string
CompressionMethod: contain the compression method (see Method* constants)
Level: contain the level of compression (a value from -1 to 9. see Compression* constants)
Zip64: If you want to have the zip file support more than 2 GB of data, set this to true to create a 64 bit file.
See also:
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
ZipMBS.CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
filename: the filename in zip. This can include path information with slash as delimiter. e.g. "foldername/file.txt"
FileInfo: the file date.
ExtraLocal: contains the extrafield data the the local header.
ExtraGlobal: contains the extrafield data the the local header.
Comment: comment contain the comment string
CompressionMethod: contain the compression method (see Method* constants)
Level: contain the level of compression (a value from -1 to 9. see Compression* constants)
Zip64: If you want to have the zip file support more than 2 GB of data, set this to true to create a 64 bit file.
Raw: If true you read the file raw (the data will not be compressed).
See also:
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string = "", ExtraGlobal as string = "", Comment as String = "", CompressionMethod as Integer = 8, Level as Integer = 9, Zip64 as boolean = false)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
ZipMBS.CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
filename: the filename in zip. This can include path information with slash as delimiter. e.g. "foldername/file.txt"
FileInfo: the file date.
ExtraLocal: contains the extrafield data the the local header.
ExtraGlobal: contains the extrafield data the the local header.
Comment: comment contain the comment string
CompressionMethod: contain the compression method (see Method* constants)
Level: contain the level of compression (a value from -1 to 9. see Compression* constants)
Zip64: If you want to have the zip file support more than 2 GB of data, set this to true to create a 64 bit file.
Raw: If true you read the file raw (the data will not be compressed).
windowBits: Parameters for zlib compression. (for example -15)
memLevel: Parameters for zlib compression. (for example 8 or 9)
Strategy: Parameters for zlib compression. (See Strategy* constants)
Password: The password to use.
crcForCtypting: the CRC value of the input file.
The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. The default value is 15.
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits determines the window size.
The memLevel parameter specifies how much memory should be allocated for the internal compression state. memLevel=1 uses minimum memory but is slow and reduces compression ratio; memLevel=9 uses maximum memory for optimal speed. The default value is 8. See zconf.h for total memory usage as a function of windowBits and memLevel.
The strategy parameter is used to tune the compression algorithm. Use the value StrategyDefault for normal data, StrategyFiltered for data produced by a filter (or predictor), StrategyHuffmanOnly to force Huffman encoding only (no string match), or StrategyRLE to limit match distances to one (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of StrategyFiltered is to force more Huffman coding and less string matching; it is somewhat intermediate between StrategyDefault and StrategyHuffmanOnly. StrategyRLE is designed to be almost as fast as StrategyHuffmanOnly, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. StrategyFixed prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
See also:
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string = "", ExtraGlobal as string = "", Comment as String = "", CompressionMethod as Integer = 8, Level as Integer = 9, Zip64 as boolean = false)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
ZipMBS.CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32, versionMadeBy as UInt32, flagBase as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
filename: the filename in zip. This can include path information with slash as delimiter. e.g. "foldername/file.txt"
FileInfo: the file date.
ExtraLocal: contains the extrafield data the the local header.
ExtraGlobal: contains the extrafield data the the local header.
Comment: comment contain the comment string
CompressionMethod: contain the compression method (see Method* constants)
Level: contain the level of compression (a value from -1 to 9. see Compression* constants)
Zip64: If you want to have the zip file support more than 2 GB of data, set this to true to create a 64 bit file.
Raw: If true you read the file raw (the data will not be compressed).
windowBits: Parameters for zlib compression. (for example -15)
memLevel: Parameters for zlib compression. (for example 8 or 9)
Strategy: Parameters for zlib compression. (See Strategy* constants)
Password: The password to use.
crcForCtypting: the CRC value of the input file.
versionMadeBy: value for Version made by field
flagBase: value for flag field (compression level info will be added)
The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. The default value is 15.
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits determines the window size.
The memLevel parameter specifies how much memory should be allocated for the internal compression state. memLevel=1 uses minimum memory but is slow and reduces compression ratio; memLevel=9 uses maximum memory for optimal speed. The default value is 8. See zconf.h for total memory usage as a function of windowBits and memLevel.
The strategy parameter is used to tune the compression algorithm. Use the value StrategyDefault for normal data, StrategyFiltered for data produced by a filter (or predictor), StrategyHuffmanOnly to force Huffman encoding only (no string match), or StrategyRLE to limit match distances to one (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of StrategyFiltered is to force more Huffman coding and less string matching; it is somewhat intermediate between StrategyDefault and StrategyHuffmanOnly. StrategyRLE is designed to be almost as fast as StrategyHuffmanOnly, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. StrategyFixed prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
See also:
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string = "", ExtraGlobal as string = "", Comment as String = "", CompressionMethod as Integer = 8, Level as Integer = 9, Zip64 as boolean = false)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean)
- CreateFile(Filename as string, FileInfo as ZipFileInfoMBS, ExtraLocal as string, ExtraGlobal as string, Comment as String, CompressionMethod as Integer, Level as Integer, Zip64 as boolean, Raw as boolean, WindowBits as Integer, MemLevel as Integer, Strategy as Integer, Password as string, crcForCtypting as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Compression | MBS Compression Plugin | 8.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
A file in the zip archive must have been created.
The items on this page are in the following plugins: MBS Compression Plugin.