docs: function encodeBool(value) {
      let buffer = new ByteBuffer();
      if (value === null) {
          return buffer;
      }
      if (typeof value === 'string') {
          return buffer.writeVarint32(value.toLowerCase() === 'false' ? 0 : Boolean(value));
      }
      return buffer.writeVarint32(value ? 1 : 0);
  }