static st64 buf_write(RBuffer *b, const ut8 *buf, size_t len) {
	r_return_val_if_fail (b && b->methods, -1);
	buf_wholefree (b);
	return b->methods->write? b->methods->write (b, buf, len): -1;
}
static st64 buf_write(RBuffer *b, const ut8 *buf, size_t len) {
	r_return_val_if_fail (b && b->methods, -1);
	buf_wholefree (b);
	return b->methods->write? b->methods->write (b, buf, len): -1;
}