         } cond
     ] [
         {
-            { [ dup -0x1f >= ] [ 1 >be write ] }
-            { [ dup -0x80 >= ] [ 0xd0 write1 1 >be write ] }
+            { [ dup -0x1f >= ] [ write1 ] }
+            { [ dup -0x80 >= ] [ 0xd0 write1 write1 ] }
             { [ dup -0x8000 >= ] [ 0xd1 write1 2 >be write ] }
             { [ dup -0x80000000 >= ] [ 0xd2 write1 4 >be write ] }
             { [ dup -0x8000000000000000 >= ] [ 0xd3 write1 8 >be write ] }

    dup 0 >= [
        {
            { [ dup 0x7f <= ] [ write1 ] }
            { [ dup 0xff <= ] [ 0xcc write1 1 >be write ] }
            { [ dup 0xffff <= ] [ 0xcd write1 2 >be write ] }
            { [ dup 0xffffffff <= ] [ 0xce write1 4 >be write ] }
            { [ dup 0xffffffffffffffff <= ] [ 0xcf write1 8 >be write ] }

! Copyright (C) 2013 John Benediktsson
! See http://factorcode.org/license.txt for BSD license

USING: arrays assocs byte-arrays combinators grouping hashtables
io io.binary io.encodings io.encodings.binary
io.encodings.string io.encodings.utf8 io.streams.byte-array
io.streams.string kernel math math.bitwise math.order namespaces
sequences strings ;

IN: msgpack

