Re: [Cbor] Packed CBOR review

Brendan Moran <Brendan.Moran@arm.com> Thu, 17 June 2021 11:18 UTC

Return-Path: <Brendan.Moran@arm.com>
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 754643A1B38 for <cbor@ietfa.amsl.com>; Thu, 17 Jun 2021 04:18:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=VmckzT31; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=VmckzT31
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 hhtYE5Pl-Lu6 for <cbor@ietfa.amsl.com>; Thu, 17 Jun 2021 04:17:56 -0700 (PDT)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2085.outbound.protection.outlook.com [40.107.20.85]) (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 590823A1B29 for <cbor@ietf.org>; Thu, 17 Jun 2021 04:17:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=VmckzT31piZ7FIenG0t4TX9bBQGA9qAyLCwEWiDOp5d44ClTbysXCrpnvXZVgLRD2poZGSxK7tx4ccsO7ww7QushLJO9Di/VViP3jxBb8Md2RzhJNnWv/cgoNzKHuwI3XQOu9e+/6L7K9yLvL/xRtQJRpOs7s/wz0FcbtlrqMho=
Received: from DB6PR07CA0117.eurprd07.prod.outlook.com (2603:10a6:6:2c::31) by AM0PR08MB5284.eurprd08.prod.outlook.com (2603:10a6:208:12a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 11:17:44 +0000
Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::25) by DB6PR07CA0117.outlook.office365.com (2603:10a6:6:2c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.7 via Frontend Transport; Thu, 17 Jun 2021 11:17:44 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 11:17:44 +0000
Received: ("Tessian outbound d8701fbbf774:v93"); Thu, 17 Jun 2021 11:17:43 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: 467b12446e5d7e0f
X-CR-MTA-TID: 64aa7808
Received: from c721c4bfc21e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 17D5A6E6-2063-4710-BE49-ACE00073CE5F.1; Thu, 17 Jun 2021 11:17:37 +0000
Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c721c4bfc21e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 11:17:37 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQdX8J8EQk2VAthPGVl9ad8Fx5foX/LKqmQEuK8kpDkTV9LCtZQ7J0AfJdtSbHzHK7HVH//PntulZ+tsevXtQ3rgt6OJ5SsDIKDHr+P7rOOqXRGA+H9OB9Fz5uJqhjrmkRsyQ3EJag3B0ZCBOZkxn7/RgDcEsiF4/WQXugYmrCnoRbLRew7Cb2WhNHNNpNGYyVZTJdkuwpGpU/6/LFjH38eGiihR8M9BfAnoKdZABQ/UkpSlF9ASW2tazXxPU6s4sEir2P9hdbH7TXYonhhYBxKZ0rJAP+Rbfz10LW0+ewWwb5bp+kPHwXFVl25nIdIcH6L0ltZiT8sOqmJwC/bnaw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=jctrjR2In4rFpAkrqdlW1aT5VywJK4f7N0KnS0WbareJJxLAjNeVp/SNtJTL0wi86cM9ykQLtExtB7pFpnBxVYjyh4U9uUQ0fDG5LtZnUq2qgkBcN3WPfVpr5g8NuCGzckdAmpa19egi+0W1Kc9xWekesxednBuVCUQ9bGjUMenh6660pMgwvv1M4d2vANEsIpd8z/BNFPMXWUYYdQQDS8HJjPRLH+ORgDiF6UmbxlPm5y8zvX0aU6CGFhpsDQGNr8S+lYzHpqng7gIpQwsqbA10Hb2BLubX26CI5bJfkj2hY6n9tPQl80jFOEj5W9OKa9yZIYo1Ant2xrPSR8nh9w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=VmckzT31piZ7FIenG0t4TX9bBQGA9qAyLCwEWiDOp5d44ClTbysXCrpnvXZVgLRD2poZGSxK7tx4ccsO7ww7QushLJO9Di/VViP3jxBb8Md2RzhJNnWv/cgoNzKHuwI3XQOu9e+/6L7K9yLvL/xRtQJRpOs7s/wz0FcbtlrqMho=
Received: from DBAPR08MB5576.eurprd08.prod.outlook.com (2603:10a6:10:1ae::11) by DB9PR08MB6668.eurprd08.prod.outlook.com (2603:10a6:10:2a9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 11:17:35 +0000
Received: from DBAPR08MB5576.eurprd08.prod.outlook.com ([fe80::3487:4e34:2e16:5521]) by DBAPR08MB5576.eurprd08.prod.outlook.com ([fe80::3487:4e34:2e16:5521%3]) with mapi id 15.20.4242.019; Thu, 17 Jun 2021 11:17:35 +0000
From: Brendan Moran <Brendan.Moran@arm.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: [Cbor] Packed CBOR review
Thread-Index: AQHXYpEHP1YPTS/t6U2wn+lIJtSz1asWnBuAgAFPYgCAAARngIAAH7cA
Date: Thu, 17 Jun 2021 11:17:34 +0000
Message-ID: <146F670A-48EA-4A90-B77C-4CCC535F1DB1@arm.com>
References: <8713C3AB-71C0-4EC0-8977-15F80EC11309@arm.com> <212CE7EA-73BC-47BF-B192-D2D523F4A376@tzi.org> <33C84949-0F9C-432C-9C94-DE2C9EE17976@arm.com> <3F367A6D-5CAD-474F-AFEE-DF1AC9A34135@tzi.org>
In-Reply-To: <3F367A6D-5CAD-474F-AFEE-DF1AC9A34135@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3654.100.0.2.22)
Authentication-Results-Original: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=arm.com;
x-originating-ip: [80.7.184.196]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 4ab7ecf6-6123-4eb9-95c2-08d931818752
x-ms-traffictypediagnostic: DB9PR08MB6668:|AM0PR08MB5284:
X-Microsoft-Antispam-PRVS: <AM0PR08MB5284977717E0AB0F06CC3978EA0E9@AM0PR08MB5284.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:9508;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: GCiv183s/W+QvRZitqQKMBrYc7Yakd+M0Sh2MmA5DvShrEelXdqHzhofcnpHq5qZg7p/UbuxhJIFhlUXCowgwxcptiMkjRy8xC3BTJv6rVC4Q5nXffuyujrouRSSJaP06OssKp2B8XqvMOOf9DyBR30eIf6Iz/7Ot9gMv854ZKTy8dMrAOWlnGd5tYqnyFIS/MD9XocyVkQPHBTmcwXqt0VF+I9HjqH06NeYph2QZxNgvvP53+I3PlrN+Pt+I/diNRrUovx3P2JLVfTGPp68mrsZAPaxt9lsX2b3oV3a+2HTIQClraomNxeXSnlMrRlM0CxhoYgFU97zx+x96poK0VUn0M0s8SG19dh0E+9+0Y8imcHGMoK98jmXR09ejHCUeeVYYZXiewVDSb+qaN9RUfxFDLau0N9Y9Hi9Rr9R73qTrDp1CL3Jv8Y3unHQfVKPZdETyTND7ViV99bqgcURYZMMEH0rLG8t1x2jvIL74+Q/WMPN6gg/aZIErOzzEewGj5lrmUsl7ZTJ8onalCQHqV5Kn22LFMoU29uc60ZFmUWGlCc43B5O57ZoR6dSqHJPNmoCWhXeHFroyXZATNnwHsFkkam1beQtFRXEyjGHWR+yT4hFxdd2iesXPAVcCRg+K3Kd3BmSOeDJEc8qCaUVTViNlqVhNDGsmgmN/WE6jl0=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5576.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(5660300002)(64756008)(66446008)(66556008)(36756003)(53546011)(6506007)(66476007)(478600001)(186003)(316002)(26005)(8936002)(2616005)(83380400001)(38100700002)(71200400001)(8676002)(4326008)(66946007)(122000001)(91956017)(6512007)(6916009)(76116006)(33656002)(86362001)(2906002)(6486002)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UHhWZG1vYTl6OWtkZGNXYVR1YUZxYTJIZEl4OWdmK1FCeDFVSG9jZm1kNHFq?= =?utf-8?B?QjNYT2pEN3hZaFEydDYzc3E0UFZVZkZBTndPSG8rVmJ4Nk9pZGdWa0ZBNnZZ?= =?utf-8?B?U3lad1UwbXM1MDVMdHVxRHIxR1RYbWJ1ZG9DMVBnV0drSWJmR0g3MWZ1ZytL?= =?utf-8?B?cDArNHpTVHp5ODNyQWd2UVAwOEdZblhlcXMrWWhGNVJKcGFiVXJuRHkvWVVw?= =?utf-8?B?Wit0bkVXYXlqM3U3L0RTTy9QN1RKa2lZRThrYjhkZnlobDU5dFFpTU84WCtR?= =?utf-8?B?RnVGUmorQlp4RWtINENsdHBtM2dzcit2NEc3bFNNOVljTUVVZHVpM2M5b2NQ?= =?utf-8?B?RjNvN2pmMzdNWHJxSmxDUHBHcEtmNVluVzVDdW4xSzAwUVlrRHJYR3NtZ0sw?= =?utf-8?B?OWg3MXFvdlFBeE4rd1QycTBZeituY1ZjaFhvMlU1a1FkRWpTVG5zeGtoSGZ5?= =?utf-8?B?bVUvOVJiSy85ZExzc3p6U2dPRmM0WWpJa1NlTWZ1SXROMHlKRG5DYStkWHdV?= =?utf-8?B?TkJKYW1NcWYzUDliQmpUVTRiQ0lXTStpWkNzK3NuV2svQXpUUmVzL3lMckEr?= =?utf-8?B?TWtkK3FzbU5xeDJBR1ZxMWtGeVlwTkE1MXU5UkFuUU95ZVdTS2YvRXVMY2cy?= =?utf-8?B?Ym80alphU3R0RThlTVcwUG5xQXBUTVpaUlY5SDl6c2hjWVFDbWhqVkNSd1JL?= =?utf-8?B?YUtid3lHdXpqeVZvRHNNRjBPbUlWZVhRWnpHL0hYdTV4M2w1TmdrT2RmSzUr?= =?utf-8?B?WUk4aVZ5SThybHlxTFZONUpiYXRTZkFTNWVKTVZYWDdmMjl4SDkwT0t2NVZH?= =?utf-8?B?a3V3UkFjQlRDWk1iT1FtbVA3ODUxWnVZYjh3REFMS3lzSXFKVXQrL3Bqb29h?= =?utf-8?B?SzlMQm9zYThGZjNZazZKS0dFbFFqMEo2blhGSnlyaCt5b08rU1dsRWVLRGFD?= =?utf-8?B?NTVOaTZ6a05DMGFneU5ZNHRPd2dJbjVsbDFnVHMxUlZDeTdIeXhsNjJvRCtJ?= =?utf-8?B?bVFOcW1rMEZYekhCblBOc1h3TnZva3JxZG5kY2hMbTF0OHVPeWdOUzRJU3hN?= =?utf-8?B?OG9DRFd1YUFmWHBtNnAwMHNmeVl4ZG5EbSswRzU2Y1JxVTdMeTRNOEFSdnFh?= =?utf-8?B?amFXUWR3MjVmTlBvQVB2TlhGMFRnRjRUdFZBTUxvSHZvcnRhZ2hvOGlxVWFS?= =?utf-8?B?SFNsNU5kRHdzNGUrWDBVWHQwakxxSFpzb21GbFRsSlIvMDYvTEhiZXRYZ3dN?= =?utf-8?B?cGhUV2ZFdHFTTGp6b0dhMncyWHhYNi8zQWRUUUxWaDdkYjRaN3V0Szg5cDBn?= =?utf-8?B?cDN3V2lxeEhCMkJSbHJiMU41SjNpdXVkSFRCSWx1WndoZjRlUWJvUUl1bUZt?= =?utf-8?B?UkxqN0FMQVZqWXRjZy9xOU1SWTVxZEdFVjRQdkN2d0Y3WkpXR1ZjV3dnWWUx?= =?utf-8?B?QmMzd3BOdXY3VW9FY0hJbmdRUCt3OUdKNFNibktscUIvcy94ZTVZRFFsYy9r?= =?utf-8?B?NXpXdHdnVWhDTzJGUUVDbDBWeG1PbGJsenhOejFLRWZnMG9YQlc4VXV2TDds?= =?utf-8?B?Y3duWWlYRFM4b3c4WTNMTkZwaWdSaHVURmVOanNXdVd1OVo3Qlg0RXZuZGgy?= =?utf-8?B?Mm05ZHJQQzNRNmdyUlcxbFlWQXhLcGFpbDJOb2tnRDFhVk5EMGxRaGxPaG51?= =?utf-8?B?QTY2Z3NrMHNvcHYwMGFKUVBYMEQ4a1Vac0h0WDh3Qm52K242WjVHUEp0WUxi?= =?utf-8?Q?JvKyDb4ZJcWa+M0rIh+z0oYeSsErwr7fvN36rvA?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <C796FF98E901D94CA5DEF52C0FDE6138@eurprd08.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6668
Original-Authentication-Results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs: 56ab09f6-e01a-41a8-c71b-08d931818226
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: vYyDl2SyuK1QltEHb1OSbQ9LPAQU161V0yd1DgNoU9lluwW5Vdl6uhhk0u4MABmbauIJMY+Lim31UH+b001DVOcWAHpHcbcCjD8582C9KwOOkE2U2XT4Fy4c8lVNmZJtx/cM0lSlrF4jpEpxe1kcQx/z7tDC3NvSUMcubBXBSikzIPgE2hxtu6RX6hnlwKZt1vJWAjGbMUsUuFZ7z2zsRllwpWXPX3CUERmELpvs0uxpz7F6J1D2ZE/PjvZLxPZ4boUkp/DrUEFxnzivFqTubX2PleMazQtnnzzN4C7kelx2i2G5ODYNG7XQpvMP0XU8d8mulWfFqByReg5NGN8Ua8PFIrSQkg3sgrNqjf5AMjaBncm44J2eEuqKzYfnoDJpytqOSuMAVP5iGZ6lfSjT8kQhVwu1BpcAyII0lM1DngQuJ+updDjI3lvSiMINfLU2RLz9m2++cX9Bon+kmXde2/M0n9Jy7E2ye0eoYJtu8jCWmTutKDJtaHft0Efjhozx2JcaUpiE4Oy7LFrbci4LndMWrlyqf/OPrSkiP4ccy99HZXggysIapagqVEzNzaihKDUR9zDX1tfa1XlZYpuCk9ZK2xVBGQGkePCkS0ekoBolMBoxXB/7z0C1BooZgGYPQFU+uPqBK0HGt5GmCMUA+8ODywvIVVP2G4rUzpXyYA0=
X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39850400004)(346002)(46966006)(36840700001)(6486002)(36860700001)(33656002)(336012)(47076005)(6512007)(8676002)(70206006)(5660300002)(70586007)(8936002)(2616005)(2906002)(26005)(81166007)(356005)(82740400003)(4326008)(186003)(83380400001)(478600001)(86362001)(6862004)(36756003)(53546011)(316002)(6506007)(82310400003); DIR:OUT; SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 11:17:44.0434 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 4ab7ecf6-6123-4eb9-95c2-08d931818752
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5284
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/MsDWLOEjFctQkwZoTlb8rxLTkGk>
Subject: Re: [Cbor] Packed CBOR review
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: Thu, 17 Jun 2021 11:18:02 -0000


> On 17 Jun 2021, at 10:24, Carsten Bormann <cabo@tzi.org> wrote:
>
>>
>> We can have our cake and eat it too. I don’t see a reason not to support all of these choices.
>
> Absolutely — we then just need to design how each of these choices should look like.
>
>> If we simply use a different type in each case, the encoding is unambiguous:
>>
>> Basic-Packed-CBOR = #6.51([ ?dictionary-reference, [*shared], [*prefix], [*suffix], rump])
>> rump = any
>> prefix = any
>> suffix = any
>> shared = any
>>
>> dictionary-reference /= standard-reference
>> dictionary-reference /= uri-reference
>> dictionary-reference /= hash-reference
>> dictionary-reference /= context-reference
>>
>> standard-reference = uint
>> uri-reference = tstr
>> hash-reference = bstr
>> context-reference = null
>
> I think I’d rather have
>
> Table-Setup-Uri = #6.52([Uri-reference, any])

This only costs us a tag definition and it simplifies parsing. This is probably correct.

> Etc.
> But stacking the tags (and spending another array) costs three more bytes.

I think this decision depends a lot on what the expected model is. For a single dictionary reference, it’s pretty irrelevant, so we should pick whichever is more idiomatic. The issue is when your reference wants a reference.  For example, suppose I have two reference tables that share a lot of values: Table A and Table B. With stacking tags, I am forced to make a tradeoff: either duplicate data on the endpoint or increase the size of the transmitted data:

If Table A and Table B contain duplicate data:
Data-A = 52([“Table A”, …])

If Table C contains the common parts of Tables A and B:

Data-A = 52([“Table C”, 52([“Table A”, …])])

If every table is allowed to define a reference, this problem disappears, however it creates a new one: a compressor cannot select an arbitrary set of tables known by the decompressor and compose them in the optimal order.

>
> But maybe that stacking is most useful for
> Spiffy-Standard-A-Table-Setup = #6.4711(any)
> Where 4711 is a tag allocated by spiffy standard A.
> (Otherwise we’d need a separate registry for that uint, and that makes me shudder.)
>
> In any case, stacking would allow stacking a couple standard references.
>
> How would the hash reference specify the algorithm?
> (I think CFRG would tell us that collision resistance between algorithms isn’t a well-defined property.)

We could possibly reuse SUIT digest definitions for this:
suit-digest = [algorithm-id : uint, digest: bstr]

If we use a second tag for the reference table setup, this is unambiguous.

Alternatively, cbor-wg or cose-wg could define tags for common digest algorithms.

>
> I’m also not sure that a context-reference always is null, maybe the context supplies alternate tables…

If that is the case, I suspect a context-reference should have its own tag as well.

>
> (I’m always a little put off by optional array elements in a sequence, that gets into actual parsing quickly, but this one here may be OK.)
>
>>> Apparently, in all cases it would be good to have a single data structure shape pre-defined for pre-populating the tables (“dictionary”).
>>
>> I can see two possibilities here:
>>
>> 1) just use the existing structure:
>>
>> Packed-CBOR-Dictionary = [ ?reference, [*shared], [*prefix], [*suffix]]
>
> Probably.
> Should that get a tag?

I don’t think it needs one, but feel free to convince me otherwise. Its use should always be explicit since it’s always known by a compressor or decompressor. It should always be in a map of reference/table pairs.

Best Regards,
Brendan
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.