function writeStringlike(bufferWriter, bytes, typeChar) {
  // write length prefix as ascii string
  const length = bytes.byteLength;
  const lengthPrefix = `${length}`;
  bufferWriter.writeString(lengthPrefix);
  bufferWriter.writeString(typeChar);
  bufferWriter.write(bytes);
}
@param {import('./buffer-writer.js').BufferWriter} bufferWriter
@param {Uint8Array} bytes
@param {string} typeChar