You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{\rtf1\ansi \deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\fprq2 Times New Roman{\*\falt Times};}{\f5\fswiss\fcharset0\fprq2 Arial{\*\falt Arial};}{\f11\fmodern\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;
\s29\fi-200\li400\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 2;}{\s30\fi-200\li600\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 3;}{\s31\fi-200\li800\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 4;}{
10
+
\s32\fi-200\li1000\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 5;}{\s33\fi-200\li1200\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 6;}{\s34\fi-200\li1400\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 7;}{
11
+
\s35\fi-200\li1600\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 8;}{\s36\fi-200\li1800\widctlpar\tqr\tx8640 \f4\fs18 \sbasedon0\snext0 index 9;}{\s37\qc\sb240\sa120\widctlpar \b\f4\fs26 \sbasedon0\snext28 index heading;}{\s38\widctlpar \f11\fs18
{\*\company Microsoft}{\vern57443}}\widowctrl\ftnbj\aenddoc\hyphcaps0\formshade \fet0\sectd \linex0\endnhere\titlepg {\header \pard\plain \s40\widctlpar\tqc\tx4320\tqr\tx8640 \f4\fs20 \tab Microsoft MSZIP Data Compression Format
This document explains how to encode or decode MSZIP data compression format, as used in Microsoft cabinet files, using publicly-available code from the zlib library. This information may be used to create or extract Microsoft cabinet files which utilize
21
+
MSZIP compression. The format of a cabinet file is described in other documents.
\par This document describes the format of MSZIP compressed data as used in the MSZIP compression mode of Microsoft\rquote s cabinet files. The purpose of this document is to allow anyone to encode or decode MSZIP compressed data.
\par MSZIP compression has only minor variations from Phil Katz\rquote s \lquote deflate\rquote method. Rather than re-document this method, this document will explain these variations and refer the reader to publicly-available \lquote deflate\rquote
60
+
documents. Some \lquote deflate\rquote implementations may contain extensions to the original specifications, but MSZIP uses only the three basic modes of deflate: stored, fixed Huffman tree, and dynamic Huffman tree.
61
+
\par
62
+
\par Each MSZIP data block is the result of a complete \lquote deflate\rquote compression operation. Each block is flushed out of the compressor before the next block begins, so the last sub-block in each block will be marked as the \lquote end\rquote
63
+
of the stream. Any decoding trees are discarded after each block, with only the history buffer surviving from one block to the next. Each data block represents 32k uncompressed, except that the
64
+
last block in a folder may be smaller. A two-byte MSZIP signature precedes the compressed encoding in each block, consisting of the bytes 0x43, 0x4B.
65
+
\par
66
+
\par The maximum compressed size of each MSZIP block is 32k + 12 bytes. This allows for the data to be passed as two separate \ldblquote stored\rdblquote
67
+
sub-blocks, which each have a 5-byte overhead, plus the 2-byte signature. The Microsoft MSZIP compressor will emit \ldblquote stored\rdblquote sub-blocks with a length of exactly 32k, while some implementations do not exceed 32k-1.
68
+
\par
69
+
\par Whenever a cabinet folder boundary is reached, the compression history is discarded, so that decoding any folder does not require any prior data.
70
+
\par
71
+
\par \pard\plain \s1\sb240\sa60\keepn\widctlpar \b\f5\fs28\kerning28 Where to find the \lquote deflate\rquote Specifications
72
+
\par \pard\plain \widctlpar \f4\fs20
73
+
\par The \lquote deflate\rquote algorithm was original documented by Phil Katz in APPNOTE.TXT, which accompanied the PKZip software. It\rquote
74
+
s most-recent description can be found in RFC 1951. (Try ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html for pointers to obtain this RFC.)
0 commit comments