diff --git a/preserves.md b/preserves.md index f52fc2d..348084b 100644 --- a/preserves.md +++ b/preserves.md @@ -225,8 +225,8 @@ The total ordering specified [above](#total-order) means that the following stat | `>` | A7 88 A6 'c' 'a' 'p' 't' 'u' 'r' 'e' 8A A7 88 A6 'd' 'i' 's' 'c' 'a' 'r' 'd' | | `[1 2 3 4]` | A8 82 A3 01 82 A3 02 82 A3 03 82 A3 04 | | `[-2 -1 0 1]` | A8 82 A3 FE 82 A3 FF 81 A3 82 A3 01 | -| `"hello"` | A4 'h' 'e' 'l' 'l' 'o' | -| `["a" b #"c" [] #{} #t #f]` | A8 82 A4 'a' 82 A6 'b' 82 A5 'c' 81 A8 81 A9 81 A1 81 A0 | +| `"hello"` | A4 'h' 'e' 'l' 'l' 'o' 00 | +| `["a" b #"c" [] #{} #t #f]` | A8 82 A4 'a' 00 82 A6 'b' 82 A5 'c' 81 A8 81 A9 81 A1 81 A0 | | `-257` | A3 FE FF | | `-1` | A3 FF | | `0` | A3 | @@ -242,21 +242,21 @@ The next example uses a non-`Symbol` label for a record.[^extensibility2] The `R encodes to - A7 ;; Record - 9E A8 ;; Length 30, Sequence - 87 A6 74 69 74 6C 65 64 ;; Length 7, Symbol, "titled" - 87 A6 70 65 72 73 6F 6E ;; Length 7, Symbol, "person" - 82 A3 02 ;; Length 2, SignedInteger, "2" - 86 A6 74 68 69 6E 67 ;; Length 6, Symbol, "thing" - 82 A3 01 ;; Length 2, SignedInteger, "1" - 82 A3 65 ;; Length 2, SignedInteger, "101" - 8A A4 42 6C 61 63 6B 77 65 6C 6C ;; Length 10, String, "Blackwell" - 91 A7 ;; Length 17, Record - 85 A6 64 61 74 65 ;; Length 5, Symbol, "date" - 83 A3 07 1D ;; Length 3, SignedInteger, "1821" - 82 A3 02 ;; Length 2, SignedInteger, "2" - 82 A3 03 ;; Length 2, SignedInteger, "3" - 83 A4 44 72 ;; Length 3, String, "Dr" + A7 ;; Record + 9E A8 ;; Length 30, Sequence + 87 A6 74 69 74 6C 65 64 ;; Length 7, Symbol, "titled" + 87 A6 70 65 72 73 6F 6E ;; Length 7, Symbol, "person" + 82 A3 02 ;; Length 2, SignedInteger, "2" + 86 A6 74 68 69 6E 67 ;; Length 6, Symbol, "thing" + 82 A3 01 ;; Length 2, SignedInteger, "1" + 82 A3 65 ;; Length 2, SignedInteger, "101" + 8B A4 42 6C 61 63 6B 77 65 6C 6C 00 ;; Length 11, String, "Blackwell" + 91 A7 ;; Length 17, Record + 85 A6 64 61 74 65 ;; Length 5, Symbol, "date" + 83 A3 07 1D ;; Length 3, SignedInteger, "1821" + 82 A3 02 ;; Length 2, SignedInteger, "2" + 82 A3 03 ;; Length 2, SignedInteger, "3" + 84 A4 44 72 00 ;; Length 4, String, "Dr" [^extensibility2]: It happens to line up with Racket's representation of a record label for an inheritance hierarchy @@ -309,22 +309,22 @@ when read using the Preserves text syntax encodes via the binary syntax as follows: AA - 86 A4 "Image" - 01 AC AA - 89 A4 "Animated" 86 A6 "false" - 87 A4 "Height" 83 A3 02 58 - 84 A4 "IDs" 91 A8 - 82 A3 74 - 83 A3 03 AF - 83 A3 00 EA - 84 A3 00 97 89 - 8A A4 "Thumbnail" + 87 A4 "Image" 00 + 01 B7 AA + 8A A4 "Animated" 00 86 A6 "false" + 88 A4 "Height" 00 83 A3 02 58 + 85 A4 "IDs" 00 91 A8 + 82 A3 74 + 83 A3 03 AF + 83 A3 00 EA + 84 A3 00 97 89 + 8B A4 "Thumbnail" 00 C3 AA - 87 A4 "Height" 82 A3 7D - 84 A4 "Url" A7 A4 "http://www.example.com/image/481989943" - 86 A4 "Width" 82 A3 64 - 86 A4 "Title" 95 A4 "View from 15th Floor" - 86 A4 "Width" 83 A3 03 20 + 88 A4 "Height" 00 82 A3 7D + 85 A4 "Url" 00 A8 A4 "http://www.example.com/image/481989943" 00 + 87 A4 "Width" 00 82 A3 64 + 87 A4 "Title" 00 96 A4 "View from 15th Floor" 00 + 87 A4 "Width" 00 83 A3 03 20 The second RFC 8259 example: @@ -354,24 +354,24 @@ The second RFC 8259 example: encodes to binary as follows: A8 - FE AA - 88 A4 "Address" 81 A4 - 85 A4 "City" 8E A4 "SAN FRANCISCO" - 88 A4 "Country" 83 A4 "US" - 89 A4 "Latitude" 89 A2 40 42 E2 26 80 9D 49 52 - 8A A4 "Longitude" 89 A2 C0 5E 99 56 6C F4 1F 21 - 86 A4 "State" 83 A4 "CA" - 84 A4 "Zip" 86 A4 "94107" - 8A A4 "precision" 84 A4 "zip" - FA AA - 88 A4 "Address" 81 A4 - 85 A4 "City" 8A A4 "SUNNYVALE" - 88 A4 "Country" 83 A4 "US" - 89 A4 "Latitude" 89 A2 40 42 AF 9D 66 AD B4 03 - 8A A4 "Longitude" 89 A2 C0 5E 81 AA 4F CA 42 AF - 86 A4 "State" 83 A4 "CA" - 84 A4 "Zip" 86 A4 "94085" - 8A A4 "precision" 84 A4 "zip" + 01 8C AA + 89 A4 "Address" 00 82 A4 00 + 86 A4 "City" 00 8F A4 "SAN FRANCISCO" 00 + 89 A4 "Country" 00 84 A4 "US" 00 + 8A A4 "Latitude" 00 89 A2 40 42 E2 26 80 9D 49 52 + 8B A4 "Longitude" 00 89 A2 C0 5E 99 56 6C F4 1F 21 + 87 A4 "State" 00 84 A4 "CA" 00 + 85 A4 "Zip" 00 87 A4 "94107" 00 + 8B A4 "precision" 00 85 A4 "zip" 00 + 01 88 AA + 89 A4 "Address" 00 82 A4 00 + 86 A4 "City" 00 8B A4 "SUNNYVALE" 00 + 89 A4 "Country" 00 84 A4 "US" 00 + 8A A4 "Latitude" 00 89 A2 40 42 AF 9D 66 AD B4 03 + 8B A4 "Longitude" 00 89 A2 C0 5E 81 AA 4F CA 42 AF + 87 A4 "State" 00 84 A4 "CA" 00 + 85 A4 "Zip" 00 87 A4 "94085" 00 + 8B A4 "precision" 00 85 A4 "zip" 00 ## Notes