aspose.info
EN

ZST File - Zstandard Compressed File Format

Updated

What is a ZST file?

A ZST file is a compressed file that is generated with the Zstandard (zstd) compression algorithm. It is a compressed file that is created with lossless compression by the algorithm. ZST files can be used to compress different types of files such as databases, file systems, networks, and games. The Zstandard is governed by RFC 8878 that describes the overall compression mechanism, media type, and content encoding.

ZST File Format

ZST files are stored in compressed file format to disc. The compression mechanism is as described by RFC 8878 that obsoletes RFC 8478.

ZST Frames

A ZST file consists of one or more frames. Each frame can be either a Zstandard frame or a skippable frame. A Zstandard frame contains compressed data, whereas a skippable frame contains custom user metadata.

Zstandard Frame

A Zstandard frame has the following structure.

FieldSize in Bytes
Magic_Number4 bytes
Frame_Header2-14 bytes
Data_Blockn bytes
[More Data_Blocks]
[Content_Checksum]4 bytes

Skippable Frame

A skippable frame lets the insertion of user-defined metadata in a flow of concatenated frames. The structure of a skippable frame is as follow.

Magic_NumberFrame_SizeUser_Data
4 bytes4 bytesn bytes

References