Ensure this much size is available for filter output (if required)
filter
requested size for the output buffer
true if existing data in the output buffer should be kept