minor: initialise binary buffer with correct capacity (no need to pre-allocate more than necessary). see ensureProperByteStream()