 PRIVATE>
 
 : ensure-buffer ( -- )
-    (buffer) drop ;
+    (buffer) drop ; inline
 
 : reset-buffer ( -- )
-    (buffer) 0 >>length drop ;
+    (buffer) 0 >>length drop ; inline
 
 : with-buffer ( quot -- byte-vector )
     [ (buffer) ] dip [ output-stream get ] compose

! Copyright (C) 2008 Sascha Matzke.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs bson.constants 
byte-arrays byte-vectors calendar fry io io.binary io.encodings
io.encodings.binary io.encodings.string io.encodings.utf8
io.streams.byte-array kernel math math.parser namespaces
quotations sequences serialize strings words ;


IN: bson.writer

SYMBOL: shared-buffer 

CONSTANT: INT32-SIZE 4
CONSTANT: CHAR-SIZE 1
CONSTANT: INT64-SIZE 8

: (buffer) ( -- buffer )
    shared-buffer get
