public static byte[] bgl_input_string( binary_port p, int len ) { byte[] buf = new byte[ len ]; int l = p.stream.Read( buf, 0, buf.Length ); if( l < len ) return bgl_string_shrink( buf, l ); else return buf; }