Changes between Version 12 and Version 13 of StructuredBinaryData
 Timestamp:
 20120720T00:31:49Z (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

StructuredBinaryData
v12 v13 133 133 = name == input == output == description == example = 134 134 ascii blob node string decodes some bytes as ASCII characters  `hex:6869` becomes `"hi"`  135 uint8 1‐byte blob node integer node decodes a 1‐byte unsigned integer  `hex:11` becomes `17`  136 uint16be 2‐byte blob node integer node decodes a 2‐byte big‐endian unsigned integer  `hex:0201` becomes `513`  137 uint16le 2‐byte blob node integer node decodes a 2‐byte little‐endian unsigned integer  `hex:0101` becomes `257`  135 138 uint32be 4‐byte blob node integer node decodes a 4‐byte big‐endian unsigned integer  `hex:00000201` becomes `513`  136 139 uint32le 4‐byte blob node integer node decodes a 4‐byte little‐endian unsigned integer  `hex:01010000` becomes `257`  140 uint64be 8‐byte blob node integer node decodes a 8‐byte big‐endian unsigned integer  `hex:0000000000000201` becomes `513`  141 uint64le 8‐byte blob node integer node decodes a 8‐byte little‐endian unsigned integer  `hex:0101000000000000` becomes `257`  137 142 zero_terminated blob node blob node takes bytes up until the first `00`  `hex:7f0400` becomes `hex:7f04`  138 143 … … 201 206 In approximate order of priority. 202 207 203 Transform parameters:: Currently, a transform can only have one input. This 204 makes various things impossible, particularly cases where the way a field is 205 decoded depends on previous fields. Parameters will allow a transform to use 206 multiple inputs, allowing things like 207 `.len < uint32le; .str < ascii < known_length(.len);`. It still needs to 208 be determined whether parameters should be named or just positional. 209 Simple expressions:: These are needed to determine the value of parameters. 210 Simple expressions will allow transforms like `known_length(.len)` or 211 `known_length(8)`; more complicated arithmetic expressions will be developed 212 later. 208 === Transform parameters === 209 210 Currently, a transform can only have one input. Parameters will allow a 211 transform to use multiple inputs: `transform strings(len) = struct { .str1 < 212 ascii < known_length(len); .str2 < ascii < known_length(len); };`. 213 214 At first the only expressions will be parameters, as above, previously decoded 215 fields, as in `.len < uint32le; .data < known_length(.len);`, or integer 216 literals. 217 218 === Other ideas === 219 213 220 Conditional transforms:: A way to apply different transforms depending on an 214 221 expression. For example, something like: … … 222 229 This is essential for non‐sequential blobs like filesystems. 223 230 Bitfields:: `struct` will be extended to work with bits instead of just bytes. 231 Complex expressions:: Expressions that use operators or call transforms. 224 232 Assertions:: These could be implemented as transforms that don't actually 225 233 change the input. There could be multiple levels, ranging from “warning” to