Re: [Cbor] eliding CBOR diagnostic notation binary contents

Carsten Bormann <cabo@tzi.org> Sat, 12 March 2022 20:46 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 57C0B3A0DEA for <cbor@ietfa.amsl.com>; Sat, 12 Mar 2022 12:46:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
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 hkHA3R4ZVU0r for <cbor@ietfa.amsl.com>; Sat, 12 Mar 2022 12:46:15 -0800 (PST)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 84C583A0DE8 for <cbor@ietf.org>; Sat, 12 Mar 2022 12:46:14 -0800 (PST)
Received: from [192.168.217.118] (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4KGFFZ3dHqzDCbK; Sat, 12 Mar 2022 21:46:10 +0100 (CET)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <30798.1645665697@localhost>
Date: Sat, 12 Mar 2022 21:46:10 +0100
Cc: =?utf-8?Q?Christian_Ams=C3=BCss?= <christian@amsuess.com>, cbor@ietf.org
X-Mao-Original-Outgoing-Id: 668810769.9154381-a52c1b047bd63ad753a5e30d8baa2a7e
Content-Transfer-Encoding: quoted-printable
Message-Id: <5FA0EAE5-2E02-4968-847D-8F516C2FCC65@tzi.org>
References: <289545.1643998363@dooku> <982B35D9-8541-4AB6-88DE-55018DB5BB6B@tzi.org> <27168.1644006597@localhost> <D6BA4596-C08F-4CDF-AEB4-20C264D3BB34@tzi.org> <YgO2eOiH5gMdwSGd@hephaistos.amsuess.com> <13A46D26-E131-42C8-B325-C57857246699@tzi.org> <YhY8jT6/APLawwBF@hephaistos.amsuess.com> <9709.1645661896@localhost> <83575A66-894D-4013-9E89-AA3E0DB4641B@tzi.org> <30798.1645665697@localhost>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/EqkirldMPFNCM6SpCimNicw0TFw>
Subject: Re: [Cbor] eliding CBOR diagnostic notation binary contents
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Mar 2022 20:46:20 -0000

>> Actually processing elisions should be a special flag.  That should
>> address your concern.
> 
> Yes, that works for me.

In cbor-diagnostic, this flag is now “-ah”.

$ gem install cbor-elision

$ echo "h'...4711...'" | diag2pretty.rb -ah
d9 0378       # tag(888)
   83         # array(3)
      d9 0378 # tag(888)
         f6   # primitive(22)
      42      # bytes(2)
         4711 # "G\u0011"
      d9 0378 # tag(888)
         f6   # primitive(22)

$ echo "h'...4711...'" | diag2diag.rb -ah
888([888(null), h'4711', 888(null)])

Not sure this will be the final structure we use for that, but at least there is something to play with now.

Grüße, Carsten