Changes between Version 9 and Version 10 of StructuredBinaryData


Ignore:
Timestamp:
2012-06-22T05:40:30Z (12 years ago)
Author:
Sean Bartell
Comment:

various tweaks

Legend:

Unmodified
Added
Removed
Modified
  • StructuredBinaryData

    v9 v10  
    4343
    4444The initial goals for the project are an interactive browser for filesystem
    45 structures and a debugger backend that can interpret core dumps and task
     45structures as well as a debugger backend that can interpret core dumps and task
    4646memory.
    4747
     
    6363
    6464Bithenge represents all data in the form of a data structure called a “tree,”
    65 similar to the data structure used by JSON. A tree consists of a boolean node,
    66 integer node, string node, or blob node, or an internal node with children. A
    67 boolean node holds a boolean value, an integer node holds a signed integer, and
    68 a string holds a Unicode string.
     65similar to the data structure represented by JSON. A tree consists of a boolean
     66node, integer node, string node, or blob node, or an internal node with
     67children. A boolean node holds a boolean value, an integer node holds a signed
     68integer, and a string holds a Unicode string.
    6969
    7070A blob node represents an arbitrary sequence of raw bytes. Blob nodes are
    7171polymorphic, allowing any source of raw binary data to be used. Bithenge
    7272includes blob node implementations for in‐memory buffers, files, and block
    73 devices. An implementation has been written that reads another task’s virtual
    74 memory, but it hasn’t been committed because it’s unclear whether it will be
    75 useful.
    76 
    77 An internal node has an arbitrary number of children, each associated with a
    78 unique key. The key can be any node other than an internal node. An array can
    79 be represented by an internal node with integer keys starting at 0. The tree
    80 node can provide children in an arbitrary order; the order will be used when
    81 displaying the tree, but should have no semantic significance. Internal nodes
    82 are polymorphic and can delay creation of child nodes until necessary, so
    83 keeping the whole tree in memory can be avoided.
     73devices. An implementation has also been written that reads another task’s
     74virtual memory, but it hasn’t been committed because it’s unclear whether it
     75will be useful in its current form.
     76
     77An internal node has an arbitrary number of children, each with a unique key.
     78The key can be any node other than an internal node. Arrays can be represented
     79by internal nodes with integer keys starting at 0. The tree node can provide
     80children in an arbitrary order; the order will be used when displaying the
     81tree, but should have no semantic significance. Internal nodes are polymorphic
     82and can delay creation of child nodes until necessary, so keeping the whole
     83tree in memory can be avoided.
    8484
    8585Internal nodes are currently responsible for freeing their own children. In the
     
    8989
    9090Note that all interpreted data is represented in Bithenge with nodes.
    91 Therefore, the word “blob” usually refers to a blob node, &c.
    92 
     91Therefore, the word “blob” usually refers to a blob node, and so on.
     92
     93A decoded tree for a FAT filesystem might look something like this:
    9394{{{
    94 
    9595○───bits─▶16
    9696
     
    110110}}}
    111111
    112 == Programs ==
    113 
    114 The only program currently available is a simple test that prints some trees as
    115 JSON and Python literals.
    116 
    117112== Transforms ==
    118113
     
    133128== Built‐in transforms ==
    134129
    135 These transforms are implemented in C and included with Bithenge. Note that
    136 fully specific names are preferred; scripts can define aliases if necessary.
     130These transforms will be implemented in C and included with Bithenge. Note that
     131precise names are preferred; scripts can define shorter aliases if necessary.
    137132
    138133||= name =||= input =||= output =||= description =||= example =||
     
    144139== Basic syntax ==
    145140
    146 Script files used to define new transforms.
     141Script files are used to define complicated transforms.
    147142
    148143Transforms (including built‐in transforms) can be referenced by name:
     
    166161combines the results to create an internal node. The result of each
    167162subtransform is either assigned a key or has its keys and values merged into
    168 the final internal node. Each subtransform must support `prefix_length`, so the
    169 lengths and positions of the data fields can be determined.
     163the final tree. Each subtransform must support `prefix_length`, so the lengths
     164and positions of the data fields can be determined.
    170165
    171166=== Example ===