Is there an mql4 version of this?
Any updates on this? I am running into errors
'ZipLocalHeaderOpen' has constructor and cannot be used as union member ZipHeader.mqh 52 23
Jacobie Nycambren Barksdale #:
Any updates on this? I am running into errors
Any updates on this? I am running into errors
'ZipLocalHeaderOpen' has constructor and cannot be used as union member ZipHeader.mqh 52 23
Jacobie, Stanislav Korotky has published a pack that contains this zip library here, with some fixes.
I have tested it, and so far is working pretty well.
![MQL5 Program Packer MQL5 Program Packer](https://c.mql5.com/36/84/mql5-program-packer.png)
MQL5 Program Packer
- www.mql5.com
This is MQL5 project packer: assemble all source and resource files from dependencies into a single ZIP.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Handling ZIP Archives in Pure MQL5 has been published:
The MQL5 language keeps evolving, and its new features for working with data are constantly being added. Due to innovation it has recently become possible to operate with ZIP archives using regular MQL5 tools without getting third party DLL libraries involved. This article focuses on how this is done and provides the CZip class, which is a universal tool for reading, creating and modifying ZIP archives, as an example.
Once this article's author got attracted by an interesting feature of CryptDecode function, in particular its ability to decompress a ZIP array transferred to it. This modifier was introduced by the developers of MetaTrader 5 trading platform in order to extract answers from several servers using the standard WebRequest function. However, due to certain features of the ZIP file format, it was impossible to use it directly.
Additional authentication was required: to decompress an archive it was required to know its hash sum before compressing - Adler-32 which, clearly, wasn't available. However, when discussing this issue, the developers met the request to overload CryptDecode and CryptEncode, its mirror-image twin, with a special flag that allowed to ignore Adler32 hash when decompressing the transmitted data. For inexperienced from technical perspective users this innovation could be easily explained: it enabled full functionality of ZIP archives. This article describes the ZIP file format, its specifics of data storage and offers convenient object-oriented CZip class to operate with an archive.
Each ZIP archive is a binary file that contains an ordered sequence of bytes. On the other hand, every file of a ZIP archive has a name, attributes (such as file modification time), and other properties, that we are used to seeing in a file system of any operating system. Therefore, in addition to the compressed data, each ZIP archive stores the name of a compressed file, its attributes, and other service information. The service information is placed in a very specific manner and has a regular structure. For example, if an archive contains two files (File#1 и File#2), then it will have the following scheme:
Fig. 1. Schematic representation of a ZIP archive that contains two files: File#1 and File#2
Author: Vasiliy Sokolov