Re: [hybi] deflate-stream and masking

"Bob Gezelter" <> Mon, 20 June 2011 14:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 38F4F11E8192 for <>; Mon, 20 Jun 2011 07:09:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.74
X-Spam-Status: No, score=-0.74 tagged_above=-999 required=5 tests=[BAYES_20=-0.74]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4So6X0XzIvwS for <>; Mon, 20 Jun 2011 07:09:23 -0700 (PDT)
Received: from ( []) by (Postfix) with SMTP id 7467211E8191 for <>; Mon, 20 Jun 2011 07:09:23 -0700 (PDT)
Received: (qmail 9534 invoked from network); 20 Jun 2011 14:09:18 -0000
Received: from unknown (HELO localhost) ( by with SMTP; 20 Jun 2011 14:09:17 -0000
Received: (qmail 21046 invoked by uid 99); 20 Jun 2011 14:09:16 -0000
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
User-Agent: Web-Based Email 5.5.05
Message-Id: <>
From: "Bob Gezelter" <>
Date: Mon, 20 Jun 2011 07:09:15 -0700
Mime-Version: 1.0
Subject: Re: [hybi] deflate-stream and masking
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 20 Jun 2011 14:09:24 -0000

As I have noted before, Greg's observation about the interaction of
masking and compression is undoubtedly correct.

To be effective, compression must be done when the steam of data is most
strongly correlated. In short, this should be BEFORE multiplexing,
encryption, and masking. Data on different multiplexed streams cannot be
assumed to be correlated, and correlation is needed for effective

Encrypting or masking data to create randomness similarly negates the
effectiveness of compression. 

When dealing with correlated data (e.g., the contents of a printable
file, or even a PostScript file), I have seen compression factors of
100:1. If the data had first been encrypted, or randomly masked, the
ratio would have been likely 2:1 (what is often achieved by disk or tape
compression facilities), or even less than 1:1 (worst case).

Compression should be done within each sub-stream (assuming
multiplexing, which is not in the current specification), and in any
event, before encryption and masking.

- Bob Gezelter,