1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 1 1 | r = require 'restructure' ColorRecord = new r.Struct blue: r.uint8 green: r.uint8 red: r.uint8 alpha: r.uint8 module.exports = new r.Struct version: r.uint16 numPaletteEntries: r.uint16 numPalettes: r.uint16 numColorRecords: r.uint16 colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')) colorRecordIndices: new r.Array(r.uint16, 'numPalettes') |