CNS mask files are either in the same format as electron density maps or in compressed O format.
Compressed O format is as follows:
.MASK_INPUT ! Created by MAMA V. 960517/3.8 ORIGIN 50 -25 41 EXTENT 80 77 96 GRID 100 100 192 CELL 101.4000 101.4000 199.5000 90.0000 90.0000 90.0000 COMPRESSED 46360 46363 46440 46443 46520 46523 .... END
The numbers are ranges of grid points which are within the mask.