(MS-MCI) : Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
(MS-MCI) : Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
(MS-MCI) : Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Tools. The Open Specifications documentation does not require the use of Microsoft programming
tools or programming environments in order for you to develop an implementation. If you have access
to Microsoft programming tools and environments, you are free to take advantage of them. Certain
Open Specifications documents are intended for use in conjunction with publicly available standards
specifications and network programming art and, as such, assume that the reader either is familiar
with the aforementioned material or has immediate access to it.
1 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
Revision Summary
Revision Revision
Date History Class Comments
4/10/2009 2.0 Major Updated technical content and applicable product releases.
2 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
Revision Revision
Date History Class Comments
3 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
Table of Contents
1 Introduction ............................................................................................................ 5
1.1 Glossary ........................................................................................................... 5
1.2 References ........................................................................................................ 5
1.2.1 Normative References ................................................................................... 5
1.2.2 Informative References ................................................................................. 5
1.3 Overview .......................................................................................................... 5
1.4 Relationship to Protocols and Other Structures ...................................................... 5
1.5 Applicability Statement ....................................................................................... 6
1.6 Versioning and Localization ................................................................................. 6
1.7 Vendor-Extensible Fields ..................................................................................... 6
2 Structures ............................................................................................................... 7
3 Structure Examples ................................................................................................. 8
4 Security ................................................................................................................... 9
4.1 Security Considerations for Implementers ............................................................. 9
4.2 Index of Security Fields ...................................................................................... 9
5 Appendix A: Product Behavior ............................................................................... 10
6 Change Tracking .................................................................................................... 11
7 Index ..................................................................................................................... 12
4 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
1 Introduction
The Microsoft ZIP (MSZIP) data structure enables a client or server to encode or decode data that is
stored in the DEFLATE compressed data format.
Sections 1.7 and 2 of this specification are normative. All other sections and examples in this
specification are informative.
1.1 Glossary
MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as defined
in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or SHOULD NOT.
1.2 References
Links to a document in the Microsoft Open Specifications library point to the correct section in the
most recently published version of the referenced document. However, because individual documents
in the library are not updated at the same time, the section numbers in the documents may not
match. You can confirm the correct section numbering by checking the Errata.
We conduct frequent surveys of the normative references to assure their continued availability. If you
have any issue with finding a normative reference, please contact dochelp@microsoft.com. We will
assist you in finding the relevant information.
[RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification version 1.3", RFC 1951, May
1996, http://www.ietf.org/rfc/rfc1951.txt
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC
2119, March 1997, http://www.rfc-editor.org/rfc/rfc2119.txt
1.3 Overview
MSZIP compression is a derivative of the DEFLATE compressed data format described in [RFC1951].
MSZIP uses only the three basic methods of compression described in [RFC1951] section 3.2.3: no
compression, compression with fixed Huffman codes, and compression with dynamic Huffman codes.
None.
For conceptual background information and overviews of the relationships and interactions between
this and other protocols, see [MS-OXPROTO].
5 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
1.5 Applicability Statement
The MSZIP structure is applicable to protocols or structures that are designed to use [RFC1951] to
compress or decompress data.
None.
None.
6 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
2 Structures
Each MSZIP block MUST consist of a 2-byte MSZIP signature and one or more RFC 1951 blocks. The 2-
byte MSZIP signature MUST consist of the bytes 0x43 and 0x4B. The MSZIP signature MUST be the
first 2 bytes in the MSZIP block. The MSZIP signature is shown in the following packet diagram.
MSZIP signature Byte 0 (1 byte): The first byte of the MSZIP signature MUST be 0x43.
MSZIP signature Byte 1 (1 byte): The second byte of the MSZIP signature MUST be 0x4B.
Each MSZIP block is the result of a single deflate compression operation, as defined in [RFC1951]. The
compressor that performs the compression operation MUST generate one or more RFC 1951 blocks, as
defined in [RFC1951]. The number, deflation mode, and type of RFC 1951 blocks in each MSZIP block
is determined by the compressor, as defined in [RFC1951]. The last RFC 1951 block in each MSZIP
block MUST be marked as the "end" of the stream, as defined by [RFC1951] section 3.2.3. Decoding
trees MUST be discarded after each RFC 1951 block, but the history buffer MUST be maintained. Each
MSZIP block MUST represent no more than 32 KB of uncompressed data.
The maximum compressed size of each MSZIP block is 32 KB + 12 bytes. This enables the MSZIP
block to contain 32 KB of data split between two noncompressed RFC 1951 blocks, each of which has
a value of BTYPE=00.
7 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
3 Structure Examples
The MSZIP block structure shown in the following diagram contains a single RFC 1951 block.
The MSZIP block structure shown in the following diagram contains two RFC 1951 blocks.
8 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
4 Security
None.
None.
9 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
5 Appendix A: Product Behavior
The information in this specification is applicable to the following Microsoft products or supplemental
software. References to product versions include updates to those products.
Exceptions, if any, are noted in this section. If an update version, service pack or Knowledge Base
(KB) number appears with a product name, the behavior changed in that update. The new behavior
also applies to subsequent updates unless otherwise specified. If a product edition appears with the
product version, behavior is different in that product edition.
Unless otherwise specified, any statement of optional behavior in this specification that is prescribed
using the terms "SHOULD" or "SHOULD NOT" implies product behavior in accordance with the
SHOULD or SHOULD NOT prescription. Unless otherwise specified, the term "MAY" implies that the
product does not follow the prescription.
10 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
6 Change Tracking
No table of changes is available. The document is either new or has had no changes since its last
release.
11 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016
7 Index
A field index 9
implementer considerations 9
Applicability 6 Structures
overview 7
C
T
Change tracking 11
Common data types and fields 7 Tracking changes 11
D V
Examples 8
Glossary 5
Localization 6
Normative references 5
Overview (synopsis) 5
Product behavior 10
References 5
informative 5
normative 5
Relationship to protocols and other structures 5
Security
12 / 12
[MS-MCI] - v20161017
Microsoft ZIP (MSZIP) Compression and Decompression Data Structure
Copyright © 2016 Microsoft Corporation
Release: October 17, 2016