read-msgpack ( -- obj )
MessagePack

Next:msgpack> ( seq -- obj )


Vocabulary
msgpack

Inputs
None

Outputs
objan object


Word description
Decodes an object that was serialized in the MessagePack format, reading from an input-stream.

Definition


: read-msgpack ( -- obj )
read1 {
{ [ dup 192 = ] [ drop +msgpack-nil+ ] }
{ [ dup 194 = ] [ drop f ] }
{ [ dup 195 = ] [ drop t ] }
{ [ dup 0 127 between? ] [ ] }
{ [ dup 224 mask? ] [ 1array signed-be> ] }
{ [ dup 204 = ] [ drop read1 ] }
{ [ dup 205 = ] [ drop 2 read be> ] }
{ [ dup 206 = ] [ drop 4 read be> ] }
{ [ dup 207 = ] [ drop 8 read be> ] }
{ [ dup 208 = ] [ drop 1 read signed-be> ] }
{ [ dup 209 = ] [ drop 2 read signed-be> ] }
{ [ dup 210 = ] [ drop 4 read signed-be> ] }
{ [ dup 211 = ] [ drop 8 read signed-be> ] }
{ [ dup 202 = ] [ drop 4 read be> bits>float ] }
{ [ dup 203 = ] [ drop 8 read be> bits>double ] }
{ [ dup 224 mask 160 = ] [ 31 mask read utf8 decode ] }
{ [ dup 217 = ] [ drop read1 read utf8 decode ] }
{ [ dup 218 = ] [ drop 2 read be> read utf8 decode ] }
{ [ dup 219 = ] [ drop 4 read be> read utf8 decode ] }
{ [ dup 196 = ] [ drop read1 read B{ } like ] }
{ [ dup 197 = ] [ drop 2 read be> read B{ } like ] }
{ [ dup 198 = ] [ drop 4 read be> read B{ } like ] }
{ [ dup 240 mask 144 = ] [ 15 mask read-array ] }
{ [ dup 220 = ] [ drop 2 read be> read-array ] }
{ [ dup 221 = ] [ drop 4 read be> read-array ] }
{ [ dup 240 mask 128 = ] [ 15 mask read-map ] }
{ [ dup 222 = ] [ drop 2 read be> read-map ] }
{ [ dup 223 = ] [ drop 4 read be> read-map ] }
{ [ dup 212 = ] [ drop 1 read-ext ] }
{ [ dup 213 = ] [ drop 2 read-ext ] }
{ [ dup 214 = ] [ drop 4 read-ext ] }
{ [ dup 215 = ] [ drop 8 read-ext ] }
{ [ dup 216 = ] [ drop 16 read-ext ] }
{ [ dup 199 = ] [ drop read1 read-ext ] }
{ [ dup 200 = ] [ drop 2 read be> read-ext ] }
{ [ dup 201 = ] [ drop 4 read be> read-ext ] }
[ unknown-format ]
} cond ;