Skip to content
All library documents

ZIP Archive Structure and MQL5 Tools for Trading Data

Article MQL5 articles

Summary

This technical article explains how ZIP archives store files and describes MQL5 classes for creating, loading, downloading, and extracting archives. It outlines the local file header, file data, central directory, and end record, and explains how filenames and variable-length data sit alongside fixed-size metadata. It also discusses per-file compression and the role of checksums, then presents a CZip interface intended to hide much of this format handling from MQL5 users.

The trading relevance is infrastructure: compressed tick history, quotes, market depth, and externally supplied analytical data can reduce storage or transfer needs. Examples include archiving quote data, downloading an archive, and compressing service data in memory. The article explicitly limits compatibility: it supports a subset of the ZIP format, omits data descriptors, and cannot guarantee extraction of every archive produced by third-party tools. It describes data-handling capabilities, not a trading signal or performance result.

Key ideas

  • A ZIP archive combines per-file headers and compressed data with a central directory and an end record.
  • Each file is compressed separately, which can aid recovery of unaffected files but may reduce compression efficiency for small files.
  • The proposed MQL5 classes support archive creation, loading, downloading, file management, and extraction.
  • ZIP handling can help store or transfer tick history, quotes, depth data, and other trading information.
  • The implementation supports a limited portion of the format, so compatibility with all third-party archives is not assured.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.