Add support for custom buffer sizes.
Add support for custom buffer sizes.