1284194Sdelphij
2284194Sdelphij#------------------------------------------------------------------------------
3284194Sdelphij# $File: smile,v 1.1 2011/08/17 17:37:18 christos Exp $
4284194Sdelphij# smile:  file(1) magic for Smile serialization
5284194Sdelphij#
6284194Sdelphij# The Smile serialization format uses a 4-byte header:
7284194Sdelphij#
8284194Sdelphij#   Constant byte #0: 0x3A (ASCII ':')
9284194Sdelphij#   Constant byte #1: 0x29 (ASCII ')')
10284194Sdelphij#   Constant byte #2: 0x0A (ASCII linefeed, '\n')
11284194Sdelphij#   Variable byte #3, consisting of bits:
12284194Sdelphij#     Bits 4-7 (4 MSB): 4-bit version number
13284194Sdelphij#     Bits 3: Reserved
14284194Sdelphij#     Bit 2 (mask 0x04): Whether raw binary (unescaped 8-bit) values may be present in content
15284194Sdelphij#     Bit 1 (mask 0x02): Whether shared String value checking was enabled during encoding, default false
16284194Sdelphij#     Bit 0 (mask 0x01): Whether shared property name checking was enabled during encoding, default true
17284194Sdelphij#
18284194Sdelphij# Reference: http://wiki.fasterxml.com/SmileFormatSpec
19284194Sdelphij# Created by: Pierre-Alexandre Meyer <pierre@mouraf.org>
20284194Sdelphij
21284194Sdelphij# Detection
22284194Sdelphij0	string		:)\n	Smile binary data
23284194Sdelphij
24284194Sdelphij# Versioning
25284194Sdelphij>3	byte&0xF0	x		version %d:
26284194Sdelphij
27284194Sdelphij# Properties
28284194Sdelphij>3	byte&0x04	0x04		binary raw,
29284194Sdelphij>3	byte&0x04	0x00		binary encoded,
30284194Sdelphij>3	byte&0x02	0x02		shared String values enabled,
31284194Sdelphij>3	byte&0x02	0x00		shared String values disabled,
32284194Sdelphij>3	byte&0x01	0x01		shared field names enabled
33284194Sdelphij>3	byte&0x01	0x00		shared field names disabled
34284194Sdelphij
35