# Parley compact encoding, version 1: test vectors (the format: src/compact.rs).
#
# One vector per block of `key = value` lines; blocks are separated by blank lines and lines
# starting with # are comments.
#   name     a label
#   text     the message text as UTF-8 bytes, hex
#   plain    the plain message on the data port (`<N> <text>`), hex
#   compact  the compact message (marker, code bits, padding), hex
#   symbols  the symbols the encoder emits, end symbol (256) included
#   send     the form the sender's rule picks: compact (at most 3/4 of plain) or plain
# A decode-only vector has `text` and `compact` with a tokenization other than the
# encoder's; an error vector has `compact` and `error` (the decoder must refuse it).

# ""
name = empty
text =
plain = 3020
compact = 0120
symbols = 256
send = plain

# "<R+05>"
name = report
text = 3c522b30353e
plain = 36203c522b30353e
compact = 01ba69e820
symbols = 259 48 53 62 256
send = compact

# "de N1CALL <R-08> <S:Vp>"
name = first message
text = 6465204e3143414c4c203c522d30383e203c533a56703e
plain = 3233206465204e3143414c4c203c522d30383e203c533a56703e
compact = 01b8fb8f3a94879d361203694aba08
symbols = 257 78 49 67 65 76 76 32 260 48 56 62 32 261 86 112 62 256
send = compact

# "<NAME:Tom><QTH:Riverside><LOC:JO22AA>"
name = identity
text = 3c4e414d453a546f6d3e3c5154483a5269766572736964653e3c4c4f433a4a4f323241413e
plain = 3337203c4e414d453a546f6d3e3c5154483a5269766572736964653e3c4c4f433a4a4f323241413e
compact = 01dae52e346db261b22c9618051b7d6eb8e775d410
symbols = 263 84 111 109 62 264 82 105 118 101 114 115 105 100 101 62 265 74 79 50 50 65 65 62 256
send = compact

# "<SR>\r\n<INFO>\r\n<LOCR>"
name = query batch
text = 3c53523e0d0a3c494e464f3e0d0a3c4c4f43523e
plain = 3230203c53523e0d0a3c494e464f3e0d0a3c4c4f43523e
compact = 01e82f7497ba62
symbols = 292 394 302 394 305 256
send = compact

# "Parley V0.1.0 / VARA HF v4.9.0\r\nNO GPS DATA\r\n<NAME:Bob><QTH:Testville><LOC:JO22AA>\r\nRIG: Home made\r\nPWR: 50W"
name = info reply
text = 5061726c65792056302e312e30202f20564152412048462076342e392e300d0a4e4f2047505320444154410d0a3c4e414d453a426f623e3c5154483a5465737476696c6c653e3c4c4f433a4a4f323241413e0d0a5249473a20486f6d65206d6164650d0a5057523a20353057
plain = 313038205061726c65792056302e312e30202f20564152412048462076342e392e300d0a4e4f2047505320444154410d0a3c4e414d453a426f623e3c5154483a5465737476696c6c653e3c4c4f433a4a4f323241413e0d0a5249473a20486f6d65206d6164650d0a5057523a20353057
compact = 01ed4d31c986eda74ca330d7bb0bdb5c45e6236d9432b6cc314428dbeb75c73baea2f767ac5c6211aa01bde9a79b2c80
symbols = 335 48 46 49 46 48 336 52 46 57 46 48 394 322 394 263 66 111 98 62 264 84 101 115 116 118 105 108 108 101 62 265 74 79 50 50 65 65 62 394 325 72 111 109 101 32 109 97 100 101 394 326 53 48 87 256
send = compact

# "<QSYF>14105000</QSYF>"
name = absolute QSY
text = 3c515359463e31343130353030303c2f515359463e
plain = 3231203c515359463e31343130353030303c2f515359463e
compact = 01f42e4e70d3cc637a22
symbols = 280 49 52 49 48 53 48 48 48 281 256
send = compact

# "<SM><TO:N2CALL><SBJ:Club meeting><MSG:See you at the club on Saturday. 73><U>"
name = VMail
text = 3c534d3e3c544f3a4e3243414c4c3e3c53424a3a436c7562206d656574696e673e3c4d53473a53656520796f752061742074686520636c7562206f6e2053617475726461792e2037333e3c553e
plain = 3737203c534d3e3c544f3a4e3243414c4c3e3c53424a3a436c7562206d656574696e673e3c4d53473a53656520796f752061742074686520636c7562206f6e2053617475726461792e2037333e3c553e
compact = 01de770f9de752946f5e8ac6604622de2a37db011d005373a9c5633017206c14db0c8156fe43828f5440
symbols = 339 343 78 50 67 65 76 76 62 341 67 108 117 98 32 109 101 101 116 420 62 342 83 101 101 399 32 97 116 396 99 108 117 98 32 111 110 32 83 97 116 117 114 100 97 121 438 395 62 347 256
send = compact

# "<SF:notes.txt_gzip|731|D3C82F3D2B70020A503775A8A2EA93B6>"
name = file header
text = 3c53463a6e6f7465732e7478745f677a69707c3733317c44334338324633443242373030323041353033373735413841324541393342363e
plain = 3536203c53463a6e6f7465732e7478745f677a69707c3733317c44334338324633443242373030323041353033373735413841324541393342363e
compact = 01ee645b46598dd8b7bce0b9b2c59af611f1a6e29f12818c733b3cd368509eee13a7d5bb466e260a08
symbols = 357 110 111 116 101 115 46 116 120 116 364 395 49 124 68 51 67 56 50 70 51 68 50 66 55 48 48 50 48 65 53 48 51 55 55 53 65 56 65 50 69 65 57 51 66 54 62 256
send = compact

# "Thanks for the QSO, the weather here is cold and windy today."
name = free text
text = 5468616e6b7320666f72207468652051534f2c207468652077656174686572206865726520697320636f6c6420616e642077696e647920746f6461792e
plain = 3631205468616e6b7320666f72207468652051534f2c207468652077656174686572206865726520697320636f6c6420616e642077696e647920746f6461792e
compact = 01e1f133fcbbf9fecfc4d1a6b8a0e15a86482d835702adcc20
symbols = 401 403 397 433 439 397 430 415 404 99 111 108 100 398 119 105 110 100 121 32 116 111 100 97 121 46 256
send = compact

# "ok will try"
name = short chat
text = 6f6b2077696c6c20747279
plain = 3131206f6b2077696c6c20747279
compact = 015e6fb06b2d90
symbols = 111 107 413 116 114 121 256
send = compact

# "&IT&"
name = typing
text = 26495426
plain = 342026495426
compact = 01e708
symbols = 268 256
send = compact

# "Thanks for the nice QSO, 73 <DISC>"
name = sign-off
text = 5468616e6b7320666f7220746865206e6963652051534f2c203733203c444953433e
plain = 3334205468616e6b7320666f7220746865206e6963652051534f2c203733203c444953433e
compact = 01e1f133e4869887977f821e8c80
symbols = 401 403 397 110 105 99 101 32 433 439 395 32 291 256
send = compact

# "Grüße aus München, 73 😀"
name = non-ASCII
text = 4772c3bcc39f6520617573204dc3bc6e6368656e2c20373320f09f9880
plain = 3234204772c3bcc39f6520617573204dc3bc6e6368656e2c20373320f09f9880
compact = 01e4d9f90fc5fe43971055894323f21f8b929d6192ff0439ae5fce79b2
symbols = 71 114 195 188 195 159 101 32 97 117 115 32 77 195 188 110 99 104 101 110 439 395 32 240 159 152 128 256
send = plain

# "Привет! Спасибо за связь"
name = other script
text = d09fd180d0b8d0b2d0b5d1822120d0a1d0bfd0b0d181d0b8d0b1d0be20d0b7d0b020d181d0b2d18fd0b7d18c
plain = 323420d09fd180d0b8d0b2d0b5d1822120d0a1d0bfd0b0d181d0b8d0b1d0be20d0b7d0b020d181d0b2d18fd0b7d18c
compact = 01fcef2ff9ef37f9dfc47e77f05f9dfc2fe7beb1ee01f9dfb97e77f1bf9dfc07e7beaff9dfc47e77f03f9dfc607e77f0ff9dfc007e7beaff9dfc17e7bdd7f3bf87fcf7d888
symbols = 208 159 209 128 208 184 208 178 208 181 209 130 33 32 208 161 208 191 208 176 209 129 208 184 208 177 208 190 32 208 183 208 176 32 209 129 208 178 209 143 208 183 209 140 256
send = plain

# "\0\u{1}\u{7f}\t"
name = control bytes
text = 00017f09
plain = 342000017f09
compact = 01f917c8feadf2b2
symbols = 0 1 127 9 256
send = plain

# "Hello again, good to hear you. The antenna is a vertical on the roof and the rig runs 50 watts. Conditions are not so good today, lots of QSB, but your signal is very readable. Name is Tom and the QTH is near the coast. Thank you for the report, 73 and hope to meet you again."
name = long chat
text = 48656c6c6f20616761696e2c20676f6f6420746f206865617220796f752e2054686520616e74656e6e61206973206120766572746963616c206f6e2074686520726f6f6620616e6420746865207269672072756e732035302077617474732e20436f6e646974696f6e7320617265206e6f7420736f20676f6f6420746f6461792c206c6f7473206f66205153422c2062757420796f7572207369676e616c2069732076657279207265616461626c652e204e616d6520697320546f6d20616e642074686520515448206973206e6561722074686520636f6173742e205468616e6b20796f7520666f7220746865207265706f72742c20373320616e6420686f706520746f206d65657420796f7520616761696e2e
plain = 3237362048656c6c6f20616761696e2c20676f6f6420746f206865617220796f752e2054686520616e74656e6e61206973206120766572746963616c206f6e2074686520726f6f6620616e6420746865207269672072756e732035302077617474732e20436f6e646974696f6e7320617265206e6f7420736f20676f6f6420746f6461792c206c6f7473206f66205153422c2062757420796f7572207369676e616c2069732076657279207265616461626c652e204e616d6520697320546f6d20616e642074686520515448206973206e6561722074686520636f6173742e205468616e6b20796f7520666f7220746865207265706f72742c20373320616e6420686f706520746f206d65657420796f7520616761696e2e
compact = 01f1838f7eaad706956153343e432ab0878fa2a0b22c6c34d5102e4ce62d753859ec86a832c49284f305a535b2fc83cb92087d8cbe1c8b684abf15ab8156efc4b6cbeb394d8625fccb0dd060791a364596c182a8159910fc83ea8c7472971f0b3fd9482a667535aa56fc865565499ba1c4cff26ff07855975c74a3116e8071e610
symbols = 423 32 437 439 103 111 111 100 405 104 101 97 114 399 438 84 104 101 32 427 404 97 32 118 101 114 116 105 99 97 108 32 111 110 396 114 111 111 102 398 397 114 105 103 32 114 117 110 115 32 53 48 32 119 97 116 116 115 438 67 111 110 100 105 421 115 414 110 111 116 32 115 111 416 116 111 100 97 121 439 108 111 116 115 406 81 83 66 439 98 117 116 399 114 32 428 404 118 101 114 121 32 114 101 97 100 97 98 108 101 438 78 97 109 101 404 84 111 109 398 397 426 110 101 97 114 396 99 111 97 115 116 438 84 104 97 110 107 399 403 397 429 439 395 398 104 111 112 101 405 109 101 101 116 399 32 437 46 256
send = compact

# "de N1CALL" as literal bytes only
name = decode only
text = 6465204e3143414c4c
compact = 018041f71e752920

name = unknown version
compact = 0280
error = unknown version

name = truncated
compact = 01e1f133fc
error = truncated
