ZSTD_CStreamInSize method
These buffer sizes are softly recommended. They are not required : ZSTD_compressStream*() happily accepts any buffer size, for both input and output. Respecting the recommended size just makes it a bit easier for ZSTD_compressStream*(), reducing the amount of memory shuffling and buffering, resulting in minor performance savings.
However, note that these recommendations are from the perspective of a C caller program. If the streaming interface is invoked from some other language, especially managed ones such as Java or Go, through a foreign function interface such as jni or cgo, a major performance rule is to reduce crossing such interface to an absolute minimum. It's not rare that performance ends being spent more into the interface, rather than compression itself. In which cases, prefer using large buffers, as large as practical, for both input and output, to reduce the nb of roundtrips.
Implementation
int ZSTD_CStreamInSize() {
return _ZSTD_CStreamInSize();
}