summaryrefslogtreecommitdiffhomepage
path: root/debug-me.cabal
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-14 10:05:13 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-14 10:11:54 -0400
commitb5d5f86a88c8dbd1cee9e28a659bfe1c26f38eaa (patch)
tree1ea7fd10f9619ee20016190cb255c62d408611d5 /debug-me.cabal
parent2a271b27c65a286882332b6268e8946851c52f2a (diff)
downloaddebug-me-b5d5f86a88c8dbd1cee9e28a659bfe1c26f38eaa.tar.gz
improve JSON
Most of the time, ByteStrings will be able to be encoded as utf8, so avoid base64 when not needed. Adjusted some of the types in order to generate more usual JSON. In particular, removed StartActivity. The JSON now looks like this (with the signature still not populated): {"signature":{"v":""},"prevActivity":{"hashValue":{"v":"3b1abe614dd43bdb2d9a56777884e2d0f3bac9796e2d25c1ad52bb689c117286"},"hashMethod":"SHA256"},"activity":{"echoData":{"v":""},"enteredData":{"v":"l"}}} 203 bytes to send a single keystroke is not great when there's really only 1+64(hash) bytes of unique data. So, may end up adding a wire encoding on top of this. But, JSON is good to have for storage of the proofs, etc. Also, it does compress well. Two such JSON objects gzip -9 to 219 bytes, and three to 265 bytes. So, 37 bytes per keystroke. This is *exactly* as efficient as gzip -9 of $c$hash formatted data. This commit was sponsored by Jack Hill on Patreon.
Diffstat (limited to 'debug-me.cabal')
-rw-r--r--debug-me.cabal1
1 files changed, 1 insertions, 0 deletions
diff --git a/debug-me.cabal b/debug-me.cabal
index 6f84afb..7306d0d 100644
--- a/debug-me.cabal
+++ b/debug-me.cabal
@@ -38,6 +38,7 @@ Executable debug-me
Hash
Pty
Types
+ Val
source-repository head
type: git