diff --git a/design/protocol.md b/design/protocol.md index b7294d3..ca37998 100644 --- a/design/protocol.md +++ b/design/protocol.md @@ -70,11 +70,18 @@ The table below lists all data value types supported by TAPE. | U16 | 2 | An unsigned 16-bit integer | BEU | U32 | 4 | An unsigned 32-bit integer | BEU | U64 | 8 | An unsigned 64-bit integer | BEU -| Array | SOP[^1] | An array of any above type | PASTA +| Array[^1] | SOP[^2] | An array of any above type | PASTA | String | N/A | A UTF-8 string | UTF-8 -| StringArray | n * 2 + SOP[^1] | An array the String type | VILA +| StringArray | n * 2 + SOP[^2] | An array the String type | VILA -[^1]: SOP (sum of parts) refers to the sum of the size of every item in a data +[^1]: Array types are written as Array, where is the element type. For +example, an array of I32 would be written as I32Array. StringArray still follows +this rule, even though it is encoded differently from other arrays. Nesting +arrays inside of arrays is prohibited. This problem can be avoided in most cases +by effectively utilizing the table structure, or by improving the design of +your protocol. + +[^2]: SOP (sum of parts) refers to the sum of the size of every item in a data structure. ### Encoding Methods