Provides a set of objects that can be used to import, create and export GDSII database records. GDSII is the primary format used to transfer physical data representing circuit layout generated from EDA/CAD tools . The GDSII stream format is originally based on the CALMA format which is now obsolete. Below is a Bachus Naur representation of the GDSII stream syntax.
      <stream>     :: 
        HEADER BGNLIB [LIBDIRSIZE] [SRFNAME] [LIBSECUR]
        LIBNAME [REFLIBS] [FONTS] [ATTRTABLE]
        [GENERATIONS] [<formattype>] UNITS {<structure>}*
        ENDLIB

      <formattype> :: 
        FORMAT | FORMAT {MASK}+ ENDMASKS

      <structure>  :: 
        BGNSTR STRNAME [STRCLASS] {<element>}* ENDSTR

      <element>  :: 
        {<boundary> | <path> | <sref> | <aref> | 
         <text> | <node> | <box>} {<property>}*

      <boundary>  :: 
        BOUNDARY [ELFLAGS] [PLEX] LAYER DATATYPE XY
      
      <path>  :: 
        PATH  [ELFLAGS] [PLEX] LAYER DATATYPE [PATHTYPE] [WIDTH] [BGNEXTN]
        [ENDEXTN] XY

      <sref>  :: 
        SREF [ELFLAGS] [PLEX] SNAME [<strans>] XY

      <aref>  :: 
        AREF [ELFLAGS] [PLEX] SNAME [<strans>] COLROW XY

      <text>  :: 
        TEXT [ELFLAGS] [PLEX] LAYER <textbody>

      <node>  :: 
        NODE [ELFLAGS] [PLEX] LAYER NODETYPE XY

      <box>  :: 
        BOX [ELFLAGS] [PLEX] LAYER BOXTYPE XY

      <textbody>  :: 
        TEXTTYPE [PRESENTATION] [PATHTYPE] [WIDTH] [<strans>] XY STRING

      <strans>  :: 
        STRANS [MAG] [ANGLE]

      <property>  :: 
        PROPATTR PROPVALUE
    

Please see The GDSII techincal reference for a more complete discussion of the GDSII stream syntax.