[Cbor] Self Described CBOR - Little Endian
alex thompson <pierogitus@hotmail.com> Tue, 23 March 2021 04:50 UTC
Return-Path: <pierogitus@hotmail.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 9582F3A1D84 for <cbor@ietfa.amsl.com>; Mon, 22 Mar 2021 21:50:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.201
X-Spam-Level:
X-Spam-Status: No, score=-0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.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 bWaAjhD02gmz for <cbor@ietfa.amsl.com>; Mon, 22 Mar 2021 21:50:31 -0700 (PDT)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2028.outbound.protection.outlook.com [40.92.23.28]) (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 732D13A1D83 for <cbor@ietf.org>; Mon, 22 Mar 2021 21:50:31 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dIj1H+9QnqtpEbU03DP1YwclhF4u1jopqab+R4qV9DY6qZ2+QDIelmjxe7g9wdlAYVNGdCBVEiBxmXVUBHXW5llNV7wVg6RlQpG+/AzINj32CwNYuV2KRwfkutWmgX8A3q9/YReYv1sJEpla+8X1B7YTz7lsM4ye/kQxJw/cs1m7GuomurmlxXQf6sj9WVn31o5xFUUx+u1nYrN3OQMU8/18KSO4b9dCJ7a0FfkTv6lLzNO8f3pwFSjhYcdbOZCkazt66GmkaoNPP+bmIsjjXCw985HyJ+oz7gcSCWosDsZYRgUDUc6R18SvYGRVzeYkruOrTYpaHDarhefoUUksEg==
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=9pyzLkm2H8pKJXwjq4bbfo89BuLymsSYrhY/fJtwzXY=; b=YSLRc4Gu2KeuE6a9wKAbwOTvdS4D0Wde94vYkZ+RIdfFWIOpsIkzjpW/5QM6geVbHkZ31js+8RDJirTNGiQucxj80IhDnP2Nvn7CCXR7doPE7Lj2qF0NtfUXQWIJUN+9Cy3DSF9gmGqGVSvDtRDJMUZLIkynljqr2an2T9hIcrtkkfJFR1ldWpOCd+TOWXbJxhv8YaoezgiC1a5JFe6rfpk9CSIzi2FAhfqSBMnhn00fpi73rcXvzEbiPztMapXUkwVLMELn/ehNkQQ5gedmlHAO2OsH+Be64yk/N/rDK4NNp2BCVGduzcI3Ldm0fDzkQ+2uhpnoLfhvXL8+HKjMbw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9pyzLkm2H8pKJXwjq4bbfo89BuLymsSYrhY/fJtwzXY=; b=R2F4PqAAiAbmcbt+3vrSb9vo4eFRr6CXuqnt5jgrEt/S0vDRuJvl8wTfpjSms8+W+5uNwJOu6+yOWZl3Vbn8r5WmMUwSoavtariWL5S9Tixwd15MFknzt8ouz8tLjVaNTezEqkwsQu8opP/bBvyIgrS4VGDH9yb+Am2x35Z4KBoclVkWayoOMfeElAMPej9A971Wpp96WZjSFdGwNl0HNlGDmHpW/0rRj067/vwLRj0GppVerYwe2C3UKV0G1dAj9r/659ap8rDBkWn0tAjx21IDgXTPNfdXdj98iWIfe2zJdMvpArBVfkfQHz8nqRSOox9/zcIxUPg/qpCv1qkCzg==
Received: from BN8NAM12FT048.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::41) by BN8NAM12HT161.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::364) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.10; Tue, 23 Mar 2021 04:50:30 +0000
Received: from BY5PR20MB2898.namprd20.prod.outlook.com (2a01:111:e400:fc66::52) by BN8NAM12FT048.mail.protection.outlook.com (2a01:111:e400:fc66::214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.10 via Frontend Transport; Tue, 23 Mar 2021 04:50:30 +0000
Received: from BY5PR20MB2898.namprd20.prod.outlook.com ([fe80::a50b:3589:7a7b:2ac6]) by BY5PR20MB2898.namprd20.prod.outlook.com ([fe80::a50b:3589:7a7b:2ac6%3]) with mapi id 15.20.3955.027; Tue, 23 Mar 2021 04:50:30 +0000
From: alex thompson <pierogitus@hotmail.com>
To: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: Self Described CBOR - Little Endian
Thread-Index: AQHXH54uhCB99VulTk2G1IpC8JxRGw==
Date: Tue, 23 Mar 2021 04:50:29 +0000
Message-ID: <BY5PR20MB2898CBA491A4C0AED983C81CD2649@BY5PR20MB2898.namprd20.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-incomingtopheadermarker: OriginalChecksum:9BA4A00646877EC3ED40502A27E014E07D1A2F5814B2799DA541C2509BA040D3; UpperCasedChecksum:DF17439C98454E556291A9013475034E3244D84EF5C38C897B165A5E9ECAF279; SizeAsReceived:6785; Count:41
x-tmn: [MBUHXh0L+HZun7H/4E15EZaQaVL48yepn4kFSk/EwNr6N43XpFvsoehI0Tx/N5fir/pTf53IQEw=]
x-ms-publictraffictype: Email
x-incomingheadercount: 41
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 0ba6c6f0-4aba-4922-8f44-08d8edb72f44
x-ms-traffictypediagnostic: BN8NAM12HT161:
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: TXU7WqOCTk+Qi0k0cKyWxw+ot0eqrp2G00zRWY90Dyef47Wxb5NS9+QVxiVirs+yUduA42SNilEhROOrU3SKBmpigfkG5zZJSAvdYUwfLWU3vUZVeWX0A8fse3YHo06UtgiDRI100eC0v/4zJ298/1vXcvxph74lYgnUK66ovPECRWHzFqq1T1ZwhuT/wM4Xe7n2Mhn6t1OJfup42+WaiavUC7kPXVCqWspJh6Rgj5TXWomy9/Ejf71NpMD71HCzmA60rF68Y2UiHh2L0O3Dc5uGwihKXLZ4YP6afvUl95KR9Z1tPewnLwGjpzyHly1lkveOjHm96Fw6TRD1lLlKbeB1hP6o6wTuCw//QC+bE12s5+fs7hMnrdoWlL+zZVOOqoZLWw8VSZQzksWrLY3y2Q==
x-ms-exchange-antispam-messagedata: ICd8ii7zwlxCUGBNd4iBZI2keMTr3AnncOcXzzzDdhPTT9XXlAeWBr2iZ/CJ0Hug7JwsPifxadpANlT0Q11oJJXkRCaE3oSmIOh7DMvlAzASriLvv/4YKzkfwPbc7ER2rHCoLNm9BaTmFmU6Y0SQ8lyFxwzrU6qZaxRL+8EiMvigIXKS9zGY21LrhgdL5KVFpZw/ctddelUIFzXRzfqnsg==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT048.eop-nam12.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba6c6f0-4aba-4922-8f44-08d8edb72f44
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2021 04:50:29.9576 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM12HT161
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/rdmiLsrs9BKkSc5mOMnNC8wVN0Q>
X-Mailman-Approved-At: Wed, 24 Mar 2021 07:58:59 -0700
Subject: [Cbor] Self Described CBOR - Little Endian
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: Tue, 23 Mar 2021 04:52:28 -0000
Given the prevalence of little endian hardware and the existence of the LE typed array tags it would be useful to opt-in to LE encoding of the additional information bytes as well. This would simplify decoders that are specific to LE platforms, particularly WebAssembly which is all LE and hasn’t defined a swap instruction. The opt-in could be self described with tag 55798 (has the same non-unicode magic number characteristic as 55799). The beginning of a stream would default to BE so tag 55798 itself would appear as 0xd9d9f6. Then any following tags and descendant items would be LE. For completeness, 55798 and 55799 could be nested within one another, switching the endianness as the decoder traverses a tree of items. Nested tags 24 and 63 would pass on their endianness to their embedded items. No effect on typed array tags 64-87. It would be a breaking change for generic decoders since ignoring 55798 wouldn’t work as expected but I think the impact is very manageable and fits with CBOR’s stated goals of small code size and extensibility. Alex
- [Cbor] Self Described CBOR - Little Endian alex thompson
- Re: [Cbor] Self Described CBOR - Little Endian Felipe Gasper
- Re: [Cbor] Self Described CBOR - Little Endian Joe Hildebrand
- Re: [Cbor] Self Described CBOR - Little Endian Joe Hildebrand
- Re: [Cbor] Self Described CBOR - Little Endian Carsten Bormann
- Re: [Cbor] Self Described CBOR - Little Endian Thiago Macieira
- Re: [Cbor] Self Described CBOR - Little Endian Laurence Lundblade