inbus

diff new-encoding.txt @ 5:8ecb08252c8a

Dictionary unpacker now done.
author Eric Hopper <hopper@omnifarious.org>
date Mon, 25 Feb 2008 20:11:32 -0800
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/new-encoding.txt	Mon Feb 25 20:11:32 2008 -0800
     1.3 @@ -0,0 +1,55 @@
     1.4 +'c' Count  (the type of an enum)
     1.5 +    A count of something.  This is not meant to have the range to
     1.6 +    represent an arbitrary integer for the purposes of something like
     1.7 +    cryptography that requires arbitrarily large abstract integers.
     1.8 +
     1.9 +'m' a multi-precision integer (accepts length modifier giving octets in integer)
    1.10 +    An arbitrary sized integer.
    1.11 +'w' an unsigned multi-precision integer (accepts length modified)
    1.12 +    An arbitrary sized unsigned integer.
    1.13 +
    1.14 +'y' a yes/no value, aka a boolean
    1.15 +    Encoded as a single byte 0 or 1.
    1.16 +
    1.17 +'b' binary
    1.18 +    An opaque blob of binary data
    1.19 +
    1.20 +'s' string (accepts a length modifier for fixed length strings)
    1.21 +    A sequence of UTF-8 encoded characters.
    1.22 +
    1.23 +'k' integer 8
    1.24 +    An 8-bit two's complement integer
    1.25 +'p' unsigned integer 8
    1.26 +    An 8-bit integer that is always >= 0 (may also be used for bitfields)
    1.27 +'j' integer 16
    1.28 +    A 16-bit two's complement integer
    1.29 +'o' unsigned integer 16 (no, 'o' makes no sense)
    1.30 +    A 16-bit integer that is always >= 0 (may also be used for bitfields)
    1.31 +'i' integer 32
    1.32 +    A 32-bit two's complement integer
    1.33 +'u' integer 32
    1.34 +    A 32-bit integer that is always >= 0 (may also be used for bitfields)
    1.35 +'l' integer 64
    1.36 +    A 64-bit two's complement integer
    1.37 +'n' integer 64
    1.38 +    A 64-bit integer that is always >= 0 (may also be used for bitfields)
    1.39 +
    1.40 +'f' floating
    1.41 +    An IEEE 754 64 bit floating point number.
    1.42 +'h' half-size floating
    1.43 +    An IEEE 754 32 bit floating point number.
    1.44 +'g' a giant arbitrary precision floating point (maybe)
    1.45 +    An IEEE 754 floating point number with a sign + exponent size of 16
    1.46 +    bits and an arbitrary number of bits of precision.
    1.47 +
    1.48 +'t(...)' Tuple (a ')' terminated list of types)
    1.49 +    A grouping of values.
    1.50 +'a[.]' an array (contains one type, the type of all the elements)
    1.51 +    Array's, lists and sets are largely indistinguishable in how they
    1.52 +    look on the wire, and so they are all represented by an
    1.53 +    array. Array's are not length delimited, there is a flag before
    1.54 +    each element saying whether or not it's the last one.
    1.55 +'d{..}' a dictionary (contains two types, the key type and value type of all the elements)
    1.56 +    A mapping from keys to values.
    1.57 +'v' variant type
    1.58 +    This is a type where the type is encoded in its value.