From 35424fe3bc7082d0312e637f815c0c22e04dab88 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 28 Jan 2015 01:05:21 +0000 Subject: [PATCH] PR/417: Add CBOR files --- magic/Magdir/cbor | 21 +++++++++++++++++++++ magic/Makefile.am | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 magic/Magdir/cbor diff --git a/magic/Magdir/cbor b/magic/Magdir/cbor new file mode 100644 index 00000000..6bfd1600 --- /dev/null +++ b/magic/Magdir/cbor @@ -0,0 +1,21 @@ + +#------------------------------------------------------------------------------ +# $File: elf,v 1.68 2014/09/19 19:05:57 christos Exp $ +# cbor: file(1) magic for CBOR files as defined in RFC 7049 + +0 string \xd9\xd9\xf7 Concise Binary Object Representation (CBOR) container +!:mime application/cbor +>3 ubyte <0x20 (positive integer) +>3 ubyte <0x40 +>>3 ubyte >0x1f (negative integer) +>3 ubyte <0x60 +>>3 ubyte >0x3f (byte string) +>3 ubyte <0x80 +>>3 ubyte >0x5f (text string) +>3 ubyte <0xa0 +>3 ubyte >0x7f (array) +>3 ubyte <0xc0 +>>3 ubyte >0x9f (map) +>3 ubyte <0xe0 +>>3 ubyte >0xbf (tagged) +>3 ubyte >0xdf (other) diff --git a/magic/Makefile.am b/magic/Makefile.am index 8a7320db..19a23ae3 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -1,5 +1,5 @@ # -# $File: Makefile.am,v 1.100 2014/12/10 18:45:43 christos Exp $ +# $File: Makefile.am,v 1.101 2014/12/12 16:48:39 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -42,6 +42,7 @@ $(MAGIC_FRAGMENT_DIR)/c-lang \ $(MAGIC_FRAGMENT_DIR)/c64 \ $(MAGIC_FRAGMENT_DIR)/cad \ $(MAGIC_FRAGMENT_DIR)/cafebabe \ +$(MAGIC_FRAGMENT_DIR)/cbor \ $(MAGIC_FRAGMENT_DIR)/cddb \ $(MAGIC_FRAGMENT_DIR)/chord \ $(MAGIC_FRAGMENT_DIR)/cisco \ -- 2.40.0