For such buffers, I usualy code:
var
Buf: array[word] of byte;
Which allocates 64 KB of buffer.
But, from my little experiment, WinINet is so slow that the internal buffer size won't change much.
If you look for performance, take a look at WinHTTP, which is much faster than WinINet. More than 10 times faster, at least for multiple connections. Only missing feature is the dialog boxes for remote dial-up access:
Microsoft Windows HTTP Services (WinHTTP) provides developers with a
server-supported, high-level interface
to the HTTP/1.1 Internet protocol.
WinHTTP is designed to be used
primarily in server-based scenarios by
server applications that communicate
with HTTP servers.
WinINet was designed as an HTTP client platform for interactive
desktop applications, such as
Microsoft Internet Explorer, Microsoft
Office, and Microsoft Money. WinINet
displays a user interface for some
operations such as collecting user
credentials. WinHTTP, however, handles
these operations programmatically.
Server applications that require HTTP
client services should use WinHTTP
instead of WinINet. For more
information, see Porting WinINet
Applications to WinHTTP.
WinHTTP is also designed for use in system services and HTTP-based client
applications. However, single-user
applications that require FTP protocol
functionality, cookie persistence,
caching, automatic credential dialog
handling, Internet Explorer
compatibility, or downlevel platform
support should consider using
WinINet.
Extracted from MSDN
I've implemented both WinInet and WinHTTP client access in our Open Source ORM framework. You may take a look at this blog article to find out more info about WinHTTP.
As far as I know, the latest version of IE uses WinHTTP instead of WinINet. So we may consider going in the same direction.