[buffer] Make decodeString() aware of length constraints

That is necessary to prevent return of a partial symbol data.
[buffer] Initial write() implementation