Re: JPEG-XL as Content-Encoding?

Alex Deymo <deymo@google.com> Fri, 21 August 2020 21:24 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D2313A12A6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 21 Aug 2020 14:24:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.497
X-Spam-Level:
X-Spam-Status: No, score=-10.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FCTCpVjs-HGW for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 21 Aug 2020 14:24:46 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D09D73A12A3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 21 Aug 2020 14:24:46 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1k9EWW-0000Vp-4z for ietf-http-wg-dist@listhub.w3.org; Fri, 21 Aug 2020 21:24:32 +0000
Resent-Date: Fri, 21 Aug 2020 21:24:32 +0000
Resent-Message-Id: <E1k9EWW-0000Vp-4z@lyra.w3.org>
Received: from www-data by lyra.w3.org with local (Exim 4.92) (envelope-from <deymo@google.com>) id 1k9EWV-0000VB-Ep for ietf-http-wg@listhub.w3.org; Fri, 21 Aug 2020 21:24:31 +0000
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <deymo@google.com>) id 1k9EUT-0000LP-OA for ietf-http-wg@listhub.w3.org; Fri, 21 Aug 2020 21:22:25 +0000
Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <deymo@google.com>) id 1k9EUS-0002PT-1Q for ietf-http-wg@w3.org; Fri, 21 Aug 2020 21:22:25 +0000
Received: by mail-ej1-x635.google.com with SMTP id d11so3873240ejt.13 for <ietf-http-wg@w3.org>; Fri, 21 Aug 2020 14:22:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=K9HaPweJ2uRr5iXv0qUkPlJ5EYG+x+AmM8G6Kl2Ip34=; b=rQS+4nBhrfJrFRQ1jAYy/G00lyxrguGTzQF1pzFjvvcGewP35QkxmvjGyK8WnE5vln uNNCFQtKzZPBMmOW8/9iCNPciENcfGYsmsqwyph+YUS8Im8ncKSnVGbHmJ9fx7OhF2mO XyB1XhI2Y2fo+JFH7ytbddqNsX1L9FxWAqKKjh6zZrd+qGM9YsRAaZegvdpni/fZ92Xk 3inh+WDyKLt6kt63GEhd4oncc1xtpldXiF3Bza3ndGVm+heJ831eflGkbVhm+QcnVd6B PZwgjiHRmbIxVv7DxdWp+Y8l0qwTreNQZ4ScODm+wE8w8cdhGRT6i+7Ex07ZXwZh3I/+ O6tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=K9HaPweJ2uRr5iXv0qUkPlJ5EYG+x+AmM8G6Kl2Ip34=; b=pwIpsTEH2FrGy49Fo7RQcc+Xx48aMXBYZKZXWo1hfpxkhrMDGaqEEaiJHwNE/Dcc1S yQGoOpqBTcvNZqLafePjZgFmO9X2Nx5Jj5/5PFDLwnrL5cS3wfATptpeZibaaxJaY/bZ vL8qLN2VKmQTEiyaZrVo9yHafTm9Gv48DYHXu2T/9GsEomq4NfgUfEhT9CRVN+XGTwPZ WUC5FhR1x3Y6zZTGYBlC9A2HzO4SSmfiyu86/DKmNMcd5rWxjxT2eXf3Kie3MDN0jvsl +iCL7CRvNTARN/7ndBu95UfmKGpvU1fc8brmfQAG4vQikmHVuAGeqfu94WrTjn+arCt9 lB/A==
X-Gm-Message-State: AOAM533ZGp/bLR8N83z2wzsf5jVJlG3OVXV3grh8JReR813IbSH2O/eF IAiI5nLsyVS07/YTA9s2zT+M5ExqEW/DMEs8GnMyM7rZ3hU=
X-Google-Smtp-Source: ABdhPJxwL6CHhMjW7KDkAb4NaN6pQ/8zdKTxJrWFyJrsnCvokwxsxf71rI1l5RwtCaqBXFUM3k/SQeTb+00ysM2wqb4=
X-Received: by 2002:a17:906:393:: with SMTP id b19mr3833586eja.268.1598044932014; Fri, 21 Aug 2020 14:22:12 -0700 (PDT)
MIME-Version: 1.0
References: <CACj=BEjdwH1OtS=uQXsgPN3XVJvVEUeisjeF5_iro1vg0omqWQ@mail.gmail.com> <20200820151401.GB21689@1wt.eu> <20200820183008.GA8086@lubuntu> <18159.1597960275@critter.freebsd.dk> <CADR0UcWkxb4ZtMgjqDeAv=m6G3ks2P75L-5pvt-ctz8WyJF29g@mail.gmail.com> <CAGd9gwhR5zTjsCugrZeSr7Yt_N6wxv7k5evrLBGW=dkKt257ZA@mail.gmail.com> <8f2e15c4-1b49-2ef9-3346-baf9bc610d14@gmx.de> <CAGd9gwjWriKCRNNDkjfx0ME0L8v5qT3mO=6X1U2tDNYyXLtZ9w@mail.gmail.com> <20200821211151.GA25272@1wt.eu>
In-Reply-To: <20200821211151.GA25272@1wt.eu>
From: Alex Deymo <deymo@google.com>
Date: Fri, 21 Aug 2020 23:22:00 +0200
Message-ID: <CAGd9gwij_G1ESFxj-Nw1HteXQE977QzpAi5+1H1miLWY=rC9sg@mail.gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000825ff005ad69d470"
Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=deymo@google.com; helo=mail-ej1-x635.google.com
X-W3C-Hub-Spam-Status: No, score=-18.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1k9EUS-0002PT-1Q 7b35dd59042ea7cc28bee193711ab6f3
X-caa-id: 444c2a3d8b
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JPEG-XL as Content-Encoding?
Archived-At: <https://www.w3.org/mid/CAGd9gwij_G1ESFxj-Nw1HteXQE977QzpAi5+1H1miLWY=rC9sg@mail.gmail.com>
To: ietf-http-wg@w3.org
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37951
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Le ven. 21 août 2020 à 23:11, Willy Tarreau <w@1wt.eu> a écrit :

> On Fri, Aug 21, 2020 at 04:36:46PM +0200, Alex Deymo wrote:
> > What's not true is the opposite statement, and maybe that's where the
> > confusion is. Not every JXL is a losslessly-re-encoded JPEG, although you
> > can always do stuff like decode any JXL to pixels and encode it back to
> > JPEG but it would largely depend on how you encode back to JPEG what file
> > you end up with. The lossless recompression feature limits the options
> when
> > encoding the JXL and adds extra information to be able to
> deterministically
> > produce a certain JPEG file.
>
> So that means that you cannot reproduce the original JPEG byte-for-byte ?
> So it's not an encoding, it's a different image format. Even if it *looks*
> visually identical, just like a PNG may look like a JPG, you can't turn
> one into the other and conversely and hope that the original SHA256 of
> the delivered file that was announced along the object in a header will
> validate once a client wants to verify it. When playing only with encoding
> you can always recover the original bytes and verify them because only the
> representation changes, not the contents. Thus here it definitely is a
> different Content-Type and not a different Content-Encoding.


If you start with a JPEG file, you can convert it to a ~20% smaller JXL
file such that if you take that JXL file you get back the exact
byte-for-byte original JPEG file you started with, same data, same hash.
This is what lossless recompression of JPEG files is all about and what's
being proposed as a Content-Encoding.

My statement here was about the fact that there are other JXL files that
are not a lossless recompressed JPEG, which is fine, those simply won't
show up as payloads in a Content-Encoding context.