write-map-header ( n -- ) - Factor Documentation

write-map-header ( n -- )


Vocabulary
msgpack .private

Inputs
n an object


Outputs
None

Definition
USING: combinators endian io kernel math msgpack ;

IN: msgpack.private

: write-map-header ( n -- )
{
{ [ dup 15 <= ] [ 128 bitor write1 ] }
{ [ dup 65535 <= ] [ 222 write1 2 >be write ] }
{ [ dup 4294967295 <= ] [ 223 write1 4 >be write ] }
[ cannot-convert ]
} cond ;

AltStyle によって変換されたページ (->オリジナル) /