Docs from PS:
http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037504
To load them one needs to:
1) Process block 0x42D and get IDs of the selected layers
2) Process 'lyid' additional section of the layers
3) Activate layers with KisDocument::setPreActivatedNode()
To save them:
1) Get layers list with KisDocument::activeNodes()
2) Assign 'lyid' sections to all the layers
3) Save resource block 0x42D