docs: function write_BrtSheetProtection(sp, o) {
  	if(o == null) o = new_buf(16*4+2);
  	o.write_shift(2, sp.password ? crypto_CreatePasswordVerifier_Method1(sp.password) : 0);
  	o.write_shift(4, 1); // this record should not be written if no protection
  	[
  		["objects",             false], // fObjects
  		["scenarios",           false], // fScenarios
  		["formatCells",          true], // fFormatCells
  		["formatColumns",        true], // fFormatColumns
  		["formatRows",           true], // fFormatRows
  		["insertColumns",        true], // fInsertColumns
  		["insertRows",           true], // fInsertRows
  		["insertHyperlinks",     true], // fInsertHyperlinks
  		["deleteColumns",        true], // fDeleteColumns
  		["deleteRows",           true], // fDeleteRows
  		["selectLockedCells",   false], // fSelLockedCells
  		["sort",                 true], // fSort
  		["autoFilter",           true], // fAutoFilter
  		["pivotTables",          true], // fPivotTables
  		["selectUnlockedCells", false]  // fSelUnlockedCells
  	].forEach(function(n) {
  		/*:: if(o == null) throw "unreachable"; */
  		if(n[1]) o.write_shift(4, sp[n[0]] != null && !sp[n[0]] ? 1 : 0);
  		else      o.write_shift(4, sp[n[0]] != null && sp[n[0]] ? 0 : 1);
  	});
  	return o;
  }