Compressed File (*.z8) Specification

The *.z8 files use industry-standard stream compression/decompression library 'ZLIB'. Please refer to the original vendor's web site
for specification of the compression/decompression interfaces in greater detail, as well as for latest updates and versions.

The ZLIB interface allows you to quickly compress and decompress streaming data and achieve outstanding compression ratios.
All this provides significant benefits when dealing with large amounts of data associated with order flow.
On multi-core systems, performance can be almost doubled by unpacking the stream in one thread,
and performing actual processing in another thread.

The *.z8 file format is very simple.

Offset

Length

Type

Description

0

8 bytes

Signed 64-bit

The size of the unpacked stream. It can be useful when reading the decompressed stream via a decompression library
that does not provide an End-Of-File flag for input.

8

Till EOF

Binary data

The compressed stream itself.

You can also follow these algorithms to read the data from *.z8 files:

Algorithm 1:1. Open the source *.z8 file2. Skip the first 8 bytes3. Read a portion of compressed data into the source buffer4. Uncompress data from the source buffer into the destination buffer using ZLIB 'inflate' interface5. Repeat step 3 until the end of the source file6. Flush the destination buffer and close the source file

Algorithm 2:1. Open the source *.z8 file as a File stream2. Read the destination file size into a 64-bit signed integer N3. Create a Decompression stream and assign the File stream as its input4. Read N bytes from Decompression stream5. Close Decompression and File streams