code: function writeLSD() {
  
      // logical screen size
      WriteShort(width);
      WriteShort(height);
      // packed fields
      out.writeByte((0x80 | // 1 : global color table flag = 1 (gct used)
        0x70 | // 2-4 : color resolution = 7
        0x00 | // 5 : gct sort flag = 0
        palSize)); // 6-8 : gct size
  
      out.writeByte(0); // background color index
      out.writeByte(0); // pixel aspect ratio - assume 1:1
    }
docs: Writes Logical Screen Descriptor