Re: [hybi] deflate-stream and masking

Greg Wilkins <gregw@intalio.com> Mon, 20 June 2011 08:21 UTC

Return-Path: <gregw@intalio.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A61C811E80B4 for <hybi@ietfa.amsl.com>; Mon, 20 Jun 2011 01:21:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.688
X-Spam-Level:
X-Spam-Status: No, score=-2.688 tagged_above=-999 required=5 tests=[AWL=-0.011, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HX--iReFlhp1 for <hybi@ietfa.amsl.com>; Mon, 20 Jun 2011 01:21:11 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id C0A7C11E8076 for <hybi@ietf.org>; Mon, 20 Jun 2011 01:21:10 -0700 (PDT)
Received: by vws12 with SMTP id 12so398148vws.31 for <hybi@ietf.org>; Mon, 20 Jun 2011 01:21:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.76.4 with SMTP id g4mr3293868vdw.278.1308558064305; Mon, 20 Jun 2011 01:21:04 -0700 (PDT)
Received: by 10.52.108.9 with HTTP; Mon, 20 Jun 2011 01:21:04 -0700 (PDT)
In-Reply-To: <4DFF00C1.8090809@warmcat.com>
References: <BANLkTi=UVMAd1nER6mRBe7zoD29CSbCkGA@mail.gmail.com> <4DFF00C1.8090809@warmcat.com>
Date: Mon, 20 Jun 2011 18:21:04 +1000
Message-ID: <BANLkTinN=ae0v0D8F78stCWRNvrLL3xYfQ@mail.gmail.com>
From: Greg Wilkins <gregw@intalio.com>
To: "Andy Green (林安廸)" <andy@warmcat.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] deflate-stream and masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Jun 2011 08:21:12 -0000

On 20 June 2011 18:11, "Andy Green (林安廸)" <andy@warmcat.com> wrote:
> On 06/20/2011 07:33 AM, Somebody in the thread at some point said:
>
> Hi -
>
>> As an unmasked WS stream, it was 50675 bytes, and as a masked stream
>> is was 52623 bytes.
>> I then compressed both these streams with gzip and got 13306 bytes for
>> unmasked and 51704 bytes for the masked!!!!
>>
>> So for this very typical example, masking was sufficiently random to
>> completely negate the benefits of compression.
>
> Isn't this just saying that it's dumb to mask-then-compress?
>
> You could just compress-then-mask and get the 13Kbyte result directly and
> "safely".

That is exactly what I'm saying!

We should use a deflate-frame extension that does compress-then-mask,
rather than a deflate-stream "extension" that does mask-then-compress.

cheers